From f761cd7e9ab41e3809cd0fe11eea3beb77515461 Mon Sep 17 00:00:00 2001 From: aclement Date: Fri, 3 Oct 2008 02:06:11 +0000 Subject: [PATCH] 249551: cleanup by default --- .../internal/core/builder/AjBuildManager.java | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java index f3d6d89f4..0799a7784 100644 --- a/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java +++ b/org.aspectj.ajdt.core/src/org/aspectj/ajdt/internal/core/builder/AjBuildManager.java @@ -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; } /* -- 2.39.5