summaryrefslogtreecommitdiffstats
path: root/java/sca/modules/implementation-java
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-06-19 15:52:24 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-06-19 15:52:24 +0000
commit00c1157e3e8b3202c91b32feb13cd4ba92b5811a (patch)
tree35e2e897f363aacf20b5df735d90ec132f0cb948 /java/sca/modules/implementation-java
parent7b8e66fe1572041e14570fe6a275d3f1323517fd (diff)
TUSCANY-3070 add fix from 1.x so that visitors are not added more than once.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@786559 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/implementation-java')
-rw-r--r--java/sca/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/impl/JavaImplementationFactoryImpl.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/java/sca/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/impl/JavaImplementationFactoryImpl.java b/java/sca/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/impl/JavaImplementationFactoryImpl.java
index 0cc78498e6..d6361a5655 100644
--- a/java/sca/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/impl/JavaImplementationFactoryImpl.java
+++ b/java/sca/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/impl/JavaImplementationFactoryImpl.java
@@ -56,6 +56,13 @@ public abstract class JavaImplementationFactoryImpl implements JavaImplementatio
}
public void addClassVisitor(JavaClassVisitor visitor) {
+ for (JavaClassVisitor tmpVisitor : visitors){
+ if (tmpVisitor.getClass() == visitor.getClass()){
+ // trying to add a duplicate visitor so
+ // ignore it
+ return;
+ }
+ }
visitors.add(visitor);
}