]> source.dussan.org Git - aspectj.git/commitdiff
Added a call to remove all structure model listeners from previous run to prevent
authoracolyer <acolyer>
Sat, 16 Aug 2003 19:33:15 +0000 (19:33 +0000)
committeracolyer <acolyer>
Sat, 16 Aug 2003 19:33:15 +0000 (19:33 +0000)
structure listener leakage.

ajde/testsrc/org/aspectj/ajde/AjdeTestCase.java

index 7f3e2a4815edb456760039a4bf7ef03f6c8dd30a..3f4afbb9d4a100e30ccd4dc15aff5401ceebbb0e 100644 (file)
@@ -14,6 +14,9 @@
 package org.aspectj.ajde;
 
 import java.io.*;
+
+import org.aspectj.asm.AsmManager;
+
 import junit.framework.TestCase;
 
 public class AjdeTestCase extends TestCase {
@@ -50,6 +53,9 @@ public class AjdeTestCase extends TestCase {
 
        protected void setUp(String testDataPath) throws Exception {
                currTestDataPath = TEST_DATA_PATH + File.separatorChar + testDataPath;
+               // AMC - added this next line as a temporary workaround for 
+               // listener leakage in AsmManager induced by the Ajde test suite.
+               AsmManager.getDefault().removeAllListeners();
                ideManager.init(currTestDataPath);
                super.setUp();
                assertTrue(NullIdeManager.getIdeManager().isInitialized());