commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kohs...@apache.org
Subject svn commit: r359624 - /jakarta/commons/sandbox/javaflow/trunk/src/java/org/apache/commons/javaflow/bytecode/transformation/bcel/BcelClassTransformer.java
Date Wed, 28 Dec 2005 20:26:30 GMT
Author: kohsuke
Date: Wed Dec 28 12:26:28 2005
New Revision: 359624

URL: http://svn.apache.org/viewcvs?rev=359624&view=rev
Log:
fixed a bug in handling the null value in local variables / operand stack.

Modified:
    jakarta/commons/sandbox/javaflow/trunk/src/java/org/apache/commons/javaflow/bytecode/transformation/bcel/BcelClassTransformer.java

Modified: jakarta/commons/sandbox/javaflow/trunk/src/java/org/apache/commons/javaflow/bytecode/transformation/bcel/BcelClassTransformer.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/javaflow/trunk/src/java/org/apache/commons/javaflow/bytecode/transformation/bcel/BcelClassTransformer.java?rev=359624&r1=359623&r2=359624&view=diff
==============================================================================
--- jakarta/commons/sandbox/javaflow/trunk/src/java/org/apache/commons/javaflow/bytecode/transformation/bcel/BcelClassTransformer.java
(original)
+++ jakarta/commons/sandbox/javaflow/trunk/src/java/org/apache/commons/javaflow/bytecode/transformation/bcel/BcelClassTransformer.java
Wed Dec 28 12:26:28 2005
@@ -686,7 +686,7 @@
                 if (type.getSize() < 2 && !type.equals(Type.FLOAT))
                     type = Type.INT;
                 insList.append(insFactory.createInvoke(STACK_RECORDER_CLASS, getPushMethod(type),
Type.VOID, new Type[] { type }, Constants.INVOKEVIRTUAL));
-            } else if (type == null) {
+            } else if (type == null || type==Type.NULL) {
                 // no need to save null
             } else if (type instanceof UninitializedObjectType) {
                 // no need to save uninitialized objects
@@ -739,7 +739,7 @@
                 // in the local variables.
                 throw new Error("assertion failure");
             } else if (type instanceof ReferenceType) {
-                if (type.equals(Type.NULL)) {
+                if (type==Type.NULL) {
                     // null type is a special type assignable to any type,
                     // whereas popObject returns a java/lang/Object.
                     // the saveFrame method is written so that we don't save the 'null' object
@@ -773,7 +773,7 @@
                 }
                 insList.append(loadStackRecorder);
                 insList.append(insFactory.createInvoke(STACK_RECORDER_CLASS, getPopMethod(type),
type, Type.NO_ARGS, Constants.INVOKEVIRTUAL));
-            } else if (type == null) {
+            } else if (type == null || type==Type.NULL) {
                 insList.append(new ACONST_NULL());
             } else if (type instanceof UninitializedObjectType) {
                 // After the remove of new, there shouldn't be a



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


Mime
View raw message