Changeset 7516


Ignore:
Timestamp:
Nov 2, 2018, 9:45:34 AM (3 years ago)
Author:
Nicklas Nordborg
Message:

References #2129: Preparations for Java 11 support

Get rid of warnings related to new Integer(), new Float(), etc.

Location:
trunk/src
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/clients/web/net/sf/basedb/clients/web/Base.java

    r7260 r7516  
    13311331      {
    13321332        int percent = Values.getInt(sc.getUserClientSetting("appearance.scale"), 100);  // In percent
    1333         scale = new Float(percent / 100.0f);
     1333        scale = (float)percent / 100.0f;
    13341334        sc.setSessionSetting("appearance.scale", scale);
    13351335      }
  • trunk/src/clients/web/net/sf/basedb/clients/web/ExperimentExplorer.java

    r7241 r7516  
    13251325      if (current == null)
    13261326      {
    1327         current = new Float(value);
     1327        current = value;
    13281328      }
    13291329      else
    13301330      {
    1331         current = new Float(current.floatValue() + value);
     1331        current += value;
    13321332      }
    13331333      statistics.put(key, current);
  • trunk/src/plugins/core/net/sf/basedb/plugins/Base1PluginExecuter.java

    r6898 r7516  
    389389          configuration.setValue(execNameParameter.getName(), execNameParameter.getParameterType(), headers.get(execNameParameter.getName()));
    390390          configuration.setValue(geneAveragesParameter.getName(), geneAveragesParameter.getParameterType(), getBoolean(headers.get(geneAveragesParameter.getName())));
    391           configuration.setValue(minChannelsParameter.getName(), minChannelsParameter.getParameterType(), new Integer(headers.get(minChannelsParameter.getName())));
    392           configuration.setValue(maxChannelsParameter.getName(), maxChannelsParameter.getParameterType(), new Integer(headers.get(maxChannelsParameter.getName())));
     391          configuration.setValue(minChannelsParameter.getName(), minChannelsParameter.getParameterType(), Integer.parseInt(headers.get(minChannelsParameter.getName())));
     392          configuration.setValue(maxChannelsParameter.getName(), maxChannelsParameter.getParameterType(), Integer.parseInt(headers.get(maxChannelsParameter.getName())));
    393393          configuration.setValue(leaveStdinParameter.getName(), leaveStdinParameter.getParameterType(), getBoolean(headers.get(leaveStdinParameter.getName())));
    394394          configuration.setValue(leaveStdoutParameter.getName(), leaveStdoutParameter.getParameterType(), getBoolean(headers.get(leaveStdoutParameter.getName())));
     
    16171617        case STRING:
    16181618        {
    1619           StringParameterType t = new StringParameterType(65535, defaultValue, false, 1, new Integer(options), 1);
     1619          StringParameterType t = new StringParameterType(65535, defaultValue, false, 1, Integer.parseInt(options), 1);
    16201620          parameter = new PluginParameter<String>(name, commonName, "", t);
    16211621          break;
  • trunk/src/plugins/core/net/sf/basedb/plugins/PrintMapFlatFileImporter.java

    r6127 r7516  
    584584    try
    585585    {
    586       value = new Integer(line.value());
     586      value = Integer.parseInt(line.value());
    587587    }
    588588    catch (NumberFormatException e)
  • trunk/src/test/TestParameterType.java

    r6875 r7516  
    118118          intValue.getValues().add(100);
    119119          param.validate("integer", intValue.getValues());
    120           param.validate("integer", new Integer(-234));
     120          param.validate("integer", Integer.valueOf(-234));
    121121         
    122122          // Testing with wrong value
     
    124124          try
    125125          {
    126             param.validate("integer", new Integer(101));
     126            param.validate("integer", Integer.valueOf(101));
    127127          }
    128128          catch (InvalidDataException ex)
     
    137137        else if (param instanceof FloatParameterType)
    138138        {
    139           param.validate("float", new Float(50.0f));
     139          param.validate("float", Float.valueOf(50.0f));
    140140        }
    141141        else if (param instanceof StringParameterType)
  • trunk/src/test/TestReporter.java

    r4889 r7516  
    8888          rd.setExtended("species", "Homo Sapiens");
    8989          rd.setExtended("sequence", "atcatcgagaggaatgagacgtgacgtagg");
    90           rd.setExtended("length", new Integer(30));
     90          rd.setExtended("length", Integer.valueOf(30));
    9191        }
    9292        rb.insert(rd);
Note: See TracChangeset for help on using the changeset viewer.