src/share/classes/java/text/DecimalFormat.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

@@ -2092,11 +2092,11 @@
                             (doubleResult == 0.0 && 1/doubleResult < 0.0)) &&
                             !isParseIntegerOnly();
             }
 
             return gotDouble ?
-                (Number)new Double(doubleResult) : (Number)new Long(longResult);
+                (Number)new Double(doubleResult) : (Number)Long.valueOf(longResult);
         }
     }
 
     /**
      * Return a BigInteger multiplier.