summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-2.x/trunk/modules')
-rw-r--r--sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicPojoProcessor.java18
1 files changed, 17 insertions, 1 deletions
diff --git a/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicPojoProcessor.java b/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicPojoProcessor.java
index adb6b284ff..16d8f4e67e 100644
--- a/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicPojoProcessor.java
+++ b/sca-java-2.x/trunk/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/HeuristicPojoProcessor.java
@@ -144,7 +144,13 @@ public class HeuristicPojoProcessor extends BaseJavaClassVisitor {
private static boolean isAnnotatedWithSCA(AnnotatedElement element) {
for (Annotation a : element.getAnnotations()) {
- if (isSCAAnnotation(a)) {
+ // JCI_8023
+ // policy annotations can be added to reference fields that
+ // don't have @Reference annotations so we need to allow
+ // for the fields to be detected as references
+ if (isSCAPolicyAnnotation(a)){
+ continue;
+ } else if (isSCAAnnotation(a)) {
return true;
}
}
@@ -154,6 +160,16 @@ public class HeuristicPojoProcessor extends BaseJavaClassVisitor {
private static boolean isSCAAnnotation(Annotation a) {
return a.annotationType().getName().startsWith("org.oasisopen.sca.annotation.");
}
+
+ private static boolean isSCAPolicyAnnotation(Annotation a) {
+ if (a.annotationType().getName().startsWith("org.oasisopen.sca.annotation.PolicySets") ){
+ return true;
+ } else if (a.annotationType().getName().startsWith("org.oasisopen.sca.annotation.Intent") ){
+ return true;
+ } else {
+ return false;
+ }
+ }
private <T> void calcPropRefs(Set<Method> methods,
List<org.apache.tuscany.sca.assembly.Service> services,