summaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-10-16 13:00:01 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-10-16 13:00:01 +0000
commitac09cd82ef66822dbbd0ce4dbd04b49394f99abc (patch)
tree9c191a328055597b3b9d0bac7bd9c2bc2777d8a1 /java
parent99d8cbfd788ce769c1b70cee7be10de751111a8d (diff)
Fix JCA_10004 - @Callback on field or method must not have any parameters
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@825873 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java')
-rw-r--r--java/sca/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessor.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/java/sca/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessor.java b/java/sca/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessor.java
index 797ffcf5d7..51f2678f55 100644
--- a/java/sca/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessor.java
+++ b/java/sca/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessor.java
@@ -150,6 +150,11 @@ public class ServiceProcessor extends BaseJavaClassVisitor {
if (annotation == null) {
return;
}
+
+ if (!(annotation.value() == null || annotation.value() == Void.class)) {
+ throw new IllegalCallbackReferenceException("JCA90046 @Callback on field of method must not have any parameters: " + type.getName() + "." + method.getName());
+ }
+
if(Modifier.isPrivate(method.getModifiers())) {
throw new IllegalCallbackReferenceException("Illegal annotation @Callback found on "+method, method);
}
@@ -167,6 +172,9 @@ public class ServiceProcessor extends BaseJavaClassVisitor {
if (annotation == null) {
return;
}
+ if (!(annotation.value() == null || annotation.value() == Void.class)) {
+ throw new IllegalCallbackReferenceException("JCA90046 @Callback on field of method must not have any parameters: " + type.getName() + "." + field.getName());
+ }
if(Modifier.isPrivate(field.getModifiers())) {
throw new IllegalCallbackReferenceException("Illegal annotation @Callback found on "+field, field);
}