]> source.dussan.org Git - aspectj.git/commitdiff
249551: cleanup by default
authoraclement <aclement>
Fri, 3 Oct 2008 02:06:11 +0000 (02:06 +0000)
committeraclement <aclement>
Fri, 3 Oct 2008 02:06:11 +0000 (02:06 +0000)
org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java

index f3d6d89f4ac0d3bfd515d564d7ee431a437d4be7..0799a7784a68c479b1609f02546c034d440ab23c 100644 (file)
@@ -873,7 +873,7 @@ public class AjBuildManager implements IOutputClassFileNameProvider, IBinarySour
        public FileSystem getLibraryAccess(String[] classpaths, String[] filenames) {
                String defaultEncoding = buildConfig.getOptions().defaultEncoding;
                if ("".equals(defaultEncoding)) {//$NON-NLS-1$
-                       defaultEncoding = null; //$NON-NLS-1$   
+                       defaultEncoding = null;
                }
                // Bug 46671: We need an array as long as the number of elements in the classpath - *even though* not every
                // element of the classpath is likely to be a directory. If we ensure every element of the array is set to
@@ -898,7 +898,7 @@ public class AjBuildManager implements IOutputClassFileNameProvider, IBinarySour
 
                String defaultEncoding = buildConfig.getOptions().defaultEncoding;
                if ("".equals(defaultEncoding)) {//$NON-NLS-1$
-                       defaultEncoding = null; //$NON-NLS-1$
+                       defaultEncoding = null;
                }
 
                for (int i = 0; i < fileCount; i++) {
@@ -971,8 +971,17 @@ public class AjBuildManager implements IOutputClassFileNameProvider, IBinarySour
                // cleanup
                org.aspectj.ajdt.internal.compiler.CompilerAdapter.setCompilerAdapterFactory(null);
                AnonymousClassPublisher.aspectOf().setAnonymousClassCreationListener(null);
-               // environment.cleanup();
-               // environment = null;
+               if (!willReceiveAJDTCallbackForCleanup) {
+                       environment.cleanup();
+                       environment = null;
+               }
+       }
+
+       public static boolean willReceiveAJDTCallbackForCleanup = false;
+
+       public void cleanup() {
+               environment.cleanup();
+               environment = null;
        }
 
        /*