]> source.dussan.org Git - aspectj.git/commitdiff
optimization: reset logic for primitives so they don't anchor a world instance in...
authoraclement <aclement>
Mon, 20 Feb 2006 17:28:17 +0000 (17:28 +0000)
committeraclement <aclement>
Mon, 20 Feb 2006 17:28:17 +0000 (17:28 +0000)
weaver/src/org/aspectj/weaver/ResolvedType.java
weaver/src/org/aspectj/weaver/bcel/BcelWorld.java

index 07eb8a9264cb9baf241988f7b67a25ca178bcc99..0e78007f05dc76416e93bb248db10c4bf82465e8 100644 (file)
@@ -778,6 +778,20 @@ public abstract class ResolvedType extends UnresolvedType implements AnnotatedEl
     public static final Primitive BOOLEAN = new Primitive("Z", 1, 7);
     public static final Missing   MISSING = new Missing();
     
+    /** Reset the static state in the primitive types */
+    public static void resetPrimitives() {
+       BYTE.world=null;
+       CHAR.world=null;
+       DOUBLE.world=null;
+       FLOAT.world=null;
+       INT.world=null;
+       LONG.world=null;
+       SHORT.world=null;
+       VOID.world=null;
+       BOOLEAN.world=null;
+    }
+    
+    
     // ---- types
     public static ResolvedType makeArray(ResolvedType type, int dim) {
        if (dim == 0) return type;
index ca0aa26e9319e8b4c2c875df5da842635249ee6f..27df42c2ac07d1b46688d5b15578ac87e424520e 100644 (file)
@@ -542,6 +542,7 @@ public class BcelWorld extends World implements Repository {
            // At end of compile, close any open files so deletion of those archives is possible
                classPath.closeArchives();
                typeMap.report();
+               ResolvedType.resetPrimitives();
        }