summaryrefslogtreecommitdiffstats
path: root/java/sca
diff options
context:
space:
mode:
Diffstat (limited to 'java/sca')
-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);
}