jakarta-bcel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbros...@apache.org
Subject svn commit: r227300 - /jakarta/bcel/trunk/src/java/org/apache/bcel/util/BCELFactory.java
Date Thu, 04 Aug 2005 03:57:39 GMT
Author: dbrosius
Date: Wed Aug  3 20:57:27 2005
New Revision: 227300

URL: http://svn.apache.org/viewcvs?rev=227300&view=rev
Log:
Bug 35991: When generating ANEWARRAY statements, pass the basic type to the createNewArray
call, not the Array type itself.

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

Modified: jakarta/bcel/trunk/src/java/org/apache/bcel/util/BCELFactory.java
URL: http://svn.apache.org/viewcvs/jakarta/bcel/trunk/src/java/org/apache/bcel/util/BCELFactory.java?rev=227300&r1=227299&r2=227300&view=diff
==============================================================================
--- jakarta/bcel/trunk/src/java/org/apache/bcel/util/BCELFactory.java (original)
+++ jakarta/bcel/trunk/src/java/org/apache/bcel/util/BCELFactory.java Wed Aug  3 20:57:27
2005
@@ -5,10 +5,12 @@
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
+
 import org.apache.bcel.Constants;
 import org.apache.bcel.classfile.Utility;
 import org.apache.bcel.generic.AllocationInstruction;
 import org.apache.bcel.generic.ArrayInstruction;
+import org.apache.bcel.generic.ArrayType;
 import org.apache.bcel.generic.BranchHandle;
 import org.apache.bcel.generic.BranchInstruction;
 import org.apache.bcel.generic.CHECKCAST;
@@ -177,8 +179,10 @@
 
     case Constants.ANEWARRAY:
     case Constants.NEWARRAY:
+      if (type instanceof ArrayType)
+    	  type = ((ArrayType)type).getBasicType();
       _out.println("il.append(_factory.createNewArray(" +
-		   BCELifier.printType(type) + ", (short) " + dim + "));");
+    		  BCELifier.printType(type) + ", (short) " + dim + "));");
       break;
 
     default:



---------------------------------------------------------------------
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