jakarta-bcel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbros...@apache.org
Subject svn commit: r880760 - /jakarta/bcel/trunk/src/main/java/org/apache/bcel/util/BCELFactory.java
Date Mon, 16 Nov 2009 14:10:50 GMT
Author: dbrosius
Date: Mon Nov 16 14:10:49 2009
New Revision: 880760

URL: http://svn.apache.org/viewvc?rev=880760&view=rev
Log:
commit mj wilson's patch for bug 48203 for correctly generating float constants in BCELFactory.createConstant

Modified:
    jakarta/bcel/trunk/src/main/java/org/apache/bcel/util/BCELFactory.java

Modified: jakarta/bcel/trunk/src/main/java/org/apache/bcel/util/BCELFactory.java
URL: http://svn.apache.org/viewvc/jakarta/bcel/trunk/src/main/java/org/apache/bcel/util/BCELFactory.java?rev=880760&r1=880759&r2=880760&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/main/java/org/apache/bcel/util/BCELFactory.java (original)
+++ jakarta/bcel/trunk/src/main/java/org/apache/bcel/util/BCELFactory.java Mon Nov 16 14:10:49
2009
@@ -23,6 +23,7 @@
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
+
 import org.apache.bcel.Constants;
 import org.apache.bcel.classfile.Utility;
 import org.apache.bcel.generic.AllocationInstruction;
@@ -202,6 +203,10 @@
             embed = '"' + Utility.convertString(embed) + '"';
         } else if (value instanceof Character) {
             embed = "(char)0x" + Integer.toHexString(((Character) value).charValue());
+        } else if (value instanceof Float) {
+            embed += "f";
+        } else if (value instanceof Long) {
+            embed += "L";
         }
         _out.println("il.append(new PUSH(_cp, " + embed + "));");
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: bcel-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bcel-dev-help@jakarta.apache.org


Mime
View raw message