commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r1426228 - /commons/sandbox/nabla/trunk/src/main/java/org/apache/commons/nabla/forward/analysis/TrackingInterpreter.java
Date Thu, 27 Dec 2012 15:43:16 GMT
Author: luc
Date: Thu Dec 27 15:43:16 2012
New Revision: 1426228

URL: http://svn.apache.org/viewvc?rev=1426228&view=rev
Log:
ASM relies on the fact return type of void methods is a null reference.

Modified:
    commons/sandbox/nabla/trunk/src/main/java/org/apache/commons/nabla/forward/analysis/TrackingInterpreter.java

Modified: commons/sandbox/nabla/trunk/src/main/java/org/apache/commons/nabla/forward/analysis/TrackingInterpreter.java
URL: http://svn.apache.org/viewvc/commons/sandbox/nabla/trunk/src/main/java/org/apache/commons/nabla/forward/analysis/TrackingInterpreter.java?rev=1426228&r1=1426227&r2=1426228&view=diff
==============================================================================
--- commons/sandbox/nabla/trunk/src/main/java/org/apache/commons/nabla/forward/analysis/TrackingInterpreter.java
(original)
+++ commons/sandbox/nabla/trunk/src/main/java/org/apache/commons/nabla/forward/analysis/TrackingInterpreter.java
Thu Dec 27 15:43:16 2012
@@ -82,7 +82,13 @@ public class TrackingInterpreter extends
     /** {@inheritDoc} */
     @Override
     public TrackingValue newValue(final Type type) {
-        return (type == null) ? TrackingValue.UNINITIALIZED_VALUE : new TrackingValue(type);
+        if (type == null) {
+            return TrackingValue.UNINITIALIZED_VALUE;
+        } else if (type.equals(Type.VOID_TYPE)) {
+            return null;
+        } else {
+            return new TrackingValue(type);
+        }
     }
 
     /** {@inheritDoc} */



Mime
View raw message