src/java.base/share/classes/jdk/internal/org/objectweb/asm/commons/InstructionAdapter.java

Print this page

        

@@ -735,37 +735,37 @@
         } else if (cst >= Byte.MIN_VALUE && cst <= Byte.MAX_VALUE) {
             mv.visitIntInsn(Opcodes.BIPUSH, cst);
         } else if (cst >= Short.MIN_VALUE && cst <= Short.MAX_VALUE) {
             mv.visitIntInsn(Opcodes.SIPUSH, cst);
         } else {
-            mv.visitLdcInsn(new Integer(cst));
+            mv.visitLdcInsn(cst);
         }
     }
 
     public void lconst(final long cst) {
         if (cst == 0L || cst == 1L) {
             mv.visitInsn(Opcodes.LCONST_0 + (int) cst);
         } else {
-            mv.visitLdcInsn(new Long(cst));
+            mv.visitLdcInsn(cst);
         }
     }
 
     public void fconst(final float cst) {
         int bits = Float.floatToIntBits(cst);
         if (bits == 0L || bits == 0x3f800000 || bits == 0x40000000) { // 0..2
             mv.visitInsn(Opcodes.FCONST_0 + (int) cst);
         } else {
-            mv.visitLdcInsn(new Float(cst));
+            mv.visitLdcInsn(cst);
         }
     }
 
     public void dconst(final double cst) {
         long bits = Double.doubleToLongBits(cst);
         if (bits == 0L || bits == 0x3ff0000000000000L) { // +0.0d and 1.0d
             mv.visitInsn(Opcodes.DCONST_0 + (int) cst);
         } else {
-            mv.visitLdcInsn(new Double(cst));
+            mv.visitLdcInsn(cst);
         }
     }
 
     public void tconst(final Type type) {
         mv.visitLdcInsn(type);