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:45:59 UTC

[commons-bcel] 30/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 ca366e9f40d488077a2a1480e34f3090a32c6f89
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun May 1 08:28:10 2022 -0400

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

diff --git a/src/main/java/org/apache/bcel/generic/LDC2_W.java b/src/main/java/org/apache/bcel/generic/LDC2_W.java
index 4dd64d9d..d6e8014c 100644
--- a/src/main/java/org/apache/bcel/generic/LDC2_W.java
+++ b/src/main/java/org/apache/bcel/generic/LDC2_W.java
@@ -57,7 +57,7 @@ public class LDC2_W extends CPInstruction implements PushInstruction {
             case org.apache.bcel.Const.CONSTANT_Long:
                 return Long.valueOf(((org.apache.bcel.classfile.ConstantLong) c).getBytes());
             case org.apache.bcel.Const.CONSTANT_Double:
-                return new Double(((org.apache.bcel.classfile.ConstantDouble) c).getBytes());
+                return Double.valueOf(((org.apache.bcel.classfile.ConstantDouble) c).getBytes());
             default: // Never reached
                 throw new IllegalArgumentException("Unknown or invalid constant type at " + super.getIndex());
         }