You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2022/05/01 12:46:00 UTC

[commons-bcel] 31/49: Use valueOf factory method.

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-bcel.git

commit 7423a1707e0296142105c19db11e63092bc66510
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun May 1 08:28:23 2022 -0400

    Use valueOf factory method.
---
 src/main/java/org/apache/bcel/generic/LDC.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/bcel/generic/LDC.java b/src/main/java/org/apache/bcel/generic/LDC.java
index b324ae95..29b6d99c 100644
--- a/src/main/java/org/apache/bcel/generic/LDC.java
+++ b/src/main/java/org/apache/bcel/generic/LDC.java
@@ -100,7 +100,7 @@ public class LDC extends CPInstruction implements PushInstruction, ExceptionThro
                 c = cpg.getConstantPool().getConstant(i);
                 return ((org.apache.bcel.classfile.ConstantUtf8) c).getBytes();
             case org.apache.bcel.Const.CONSTANT_Float:
-                return new Float(((org.apache.bcel.classfile.ConstantFloat) c).getBytes());
+                return Float.valueOf(((org.apache.bcel.classfile.ConstantFloat) c).getBytes());
             case org.apache.bcel.Const.CONSTANT_Integer:
                 return Integer.valueOf(((org.apache.bcel.classfile.ConstantInteger) c).getBytes());
             case org.apache.bcel.Const.CONSTANT_Class: