]> source.dussan.org Git - aspectj.git/commitdiff
make cleanup part of compiler discard
authoraclement <aclement>
Fri, 3 Oct 2008 23:30:39 +0000 (23:30 +0000)
committeraclement <aclement>
Fri, 3 Oct 2008 23:30:39 +0000 (23:30 +0000)
ajde.core/src/org/aspectj/ajde/core/AjCompiler.java
ajde.core/src/org/aspectj/ajde/core/internal/AjdeCoreBuildManager.java

index 758073d83575d8c35cedd46835c1ea39e16ca5de..72eb4058c333d21a839e64c5f97503476a7dd605 100644 (file)
@@ -88,13 +88,6 @@ public class AjCompiler {
                }
        }
 
-       /**
-        * Cleanup the compiler instance, ready for removal.
-        */
-       public void cleanup() {
-               buildManager.cleanup();
-       }
-
        /**
         * Perform a full build.
         */
@@ -106,10 +99,12 @@ public class AjCompiler {
 
        /**
         * Clear the incremental state associated with this AjCompiler from the IncrementalStateManager. This is necessary until AjState
-        * is reworked and there's an AjState associated with an AjCompiler rather than requiring a map of them.
+        * is reworked and there's an AjState associated with an AjCompiler rather than requiring a map of them. If the environment is
+        * not cleaned up then jar locks may be kept.
         */
        public void clearLastState() {
                IncrementalStateManager.removeIncrementalStateInformationFor(compilerId);
+               buildManager.cleanupEnvironment();
        }
 
        /**
index c22248f46379ecf6c1710420e3108f60195a652d..074222b51f3e0aafa435a8b11e687c6546c57bd6 100644 (file)
@@ -391,7 +391,7 @@ public class AjdeCoreBuildManager {
                return ajBuildManager.getCustomMungerFactory();
        }
 
-       public void cleanup() {
-               ajBuildManager.cleanup();
+       public void cleanupEnvironment() {
+               ajBuildManager.cleanupEnvironment();
        }
 }