src/share/classes/javax/management/loading/MLet.java

Print this page
rev 10195 : 8048267: Replace uses of 'new Long()' with appropriate alternative across core classes
Reviewed-by: chegar, psandoz
Contributed-by: otaviojava@java.net

@@ -1309,11 +1309,11 @@
         if (type.compareTo("java.lang.Byte") == 0)
              return new Byte(param);
         if (type.compareTo("java.lang.Short") == 0)
              return new Short(param);
         if (type.compareTo("java.lang.Long") == 0)
-             return new Long(param);
+             return Long.valueOf(param);
         if (type.compareTo("java.lang.Integer") == 0)
              return new Integer(param);
         if (type.compareTo("java.lang.Float") == 0)
              return new Float(param);
         if (type.compareTo("java.lang.Double") == 0)