You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by an...@apache.org on 2009/10/16 15:00:02 UTC

svn commit: r825873 - /tuscany/java/sca/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessor.java

Author: antelder
Date: Fri Oct 16 13:00:01 2009
New Revision: 825873

URL: http://svn.apache.org/viewvc?rev=825873&view=rev
Log:
Fix JCA_10004 - @Callback on field or method must not have any parameters

Modified:
    tuscany/java/sca/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessor.java

Modified: tuscany/java/sca/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessor.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessor.java?rev=825873&r1=825872&r2=825873&view=diff
==============================================================================
--- tuscany/java/sca/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessor.java (original)
+++ tuscany/java/sca/modules/implementation-java/src/main/java/org/apache/tuscany/sca/implementation/java/introspect/impl/ServiceProcessor.java Fri Oct 16 13:00:01 2009
@@ -150,6 +150,11 @@
         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 @@
         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);
         }