Poor warning issued when annotating private field with @Callback
----------------------------------------------------------------

                 Key: TUSCANY-2282
                 URL: https://issues.apache.org/jira/browse/TUSCANY-2282
             Project: Tuscany
          Issue Type: Improvement
          Components: Java SCA Core Runtime
    Affects Versions: Java-SCA-Next
            Reporter: Kevin Williams
            Priority: Minor


I inadvertently marked a private field with @Callback and received the 
following warning:

WARNING: Invalid annotation @org.osoa.sca.annotations.Callback(value=class 
java.lang.Void) is found on private 
org.apache.tuscany.sca.vtest.javaapi.conversation.lifetime.AServiceCallback 
org.apache.tuscany.sca.vtest.javaapi.conversation.lifetime.impl.BServiceImpl.callback

I should have realized sooner what the real problem was (private fields cannot 
be annotated) but a message like:

"WARNING: Invalid annotation @org.osoa.sca.annotations.Callback(value=class 
java.lang.Void) is found on private 
org.apache.tuscany.sca.vtest.javaapi.conversation.lifetime.AServiceCallback 
org.apache.tuscany.sca.vtest.javaapi.conversation.lifetime.impl.BServiceImpl.callback.
  You must not annotate private fields and if you do then the runtime will 
ignore them and only give you this warning."

I think an exception would be even better since the application will not work 
without the requested injection.






-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to