src/share/classes/sun/tools/tree/LongExpression.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

@@ -48,11 +48,11 @@
 
     /**
      * Get the value
      */
     public Object getValue() {
-        return new Long(value);
+        return value;
     }
 
     /**
      * Check if the expression is equal to a value
      */

@@ -69,11 +69,11 @@
 
     /**
      * Code
      */
     public void codeValue(Environment env, Context ctx, Assembler asm) {
-        asm.add(where, opc_ldc2_w, new Long(value));
+        asm.add(where, opc_ldc2_w, value);
     }
 
     /**
      * Print
      */