aboutsummaryrefslogtreecommitdiffstats
path: root/asm
diff options
context:
space:
mode:
authoracolyer <acolyer>2003-08-16 19:29:42 +0000
committeracolyer <acolyer>2003-08-16 19:29:42 +0000
commit4468c138c94a858f26499deae0168562baf0c484 (patch)
tree58fbbcad27e1378a84f5b6cbc566aa4565c9d25e /asm
parent87ded0f477412c967e939cea8fa360839ec81bed (diff)
downloadaspectj-4468c138c94a858f26499deae0168562baf0c484.tar.gz
aspectj-4468c138c94a858f26499deae0168562baf0c484.zip
Added a removeAllListeners method to be called from test suite to
prevent listener leakage which cripples performance of the test cases.
Diffstat (limited to 'asm')
-rw-r--r--asm/src/org/aspectj/asm/AsmManager.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/asm/src/org/aspectj/asm/AsmManager.java b/asm/src/org/aspectj/asm/AsmManager.java
index fced532bc..d276fe569 100644
--- a/asm/src/org/aspectj/asm/AsmManager.java
+++ b/asm/src/org/aspectj/asm/AsmManager.java
@@ -119,6 +119,14 @@ public class AsmManager {
structureListeners.remove(listener);
}
+ // this shouldn't be needed - but none of the people that add listeners
+ // in the test suite ever remove them. AMC added this to be called in
+ // setup() so that the test cases would cease leaking listeners and go
+ // back to executing at a reasonable speed.
+ public void removeAllListeners() {
+ structureListeners.clear();
+ }
+
private void notifyListeners() {
for (Iterator it = structureListeners.iterator(); it.hasNext(); ) {
((IHierarchyListener)it.next()).elementsUpdated(hierarchy);