tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r656190 - /incubator/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java
Date Wed, 14 May 2008 09:43:12 GMT
Author: antelder
Date: Wed May 14 02:43:12 2008
New Revision: 656190

URL: http://svn.apache.org/viewvc?rev=656190&view=rev
Log:
TUSCANY-1867: Apply patch from Ramkumar Ramalingam to fix @OneWay with String return type
causes NullPointerException

Modified:
    incubator/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java

Modified: incubator/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java?rev=656190&r1=656189&r2=656190&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java
(original)
+++ incubator/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java
Wed May 14 02:43:12 2008
@@ -172,6 +172,19 @@
                 getActualTypes(method.getGenericExceptionTypes(), method.getExceptionTypes(),
typeBindings);
 
             boolean nonBlocking = method.isAnnotationPresent(OneWay.class);
+            if (nonBlocking) {
+                if (!(returnType == void.class)) {
+                        throw new InvalidOperationException(
+                             "Method should return 'void' when declared with an@OneWay annotation.",
+                             method);
+                }
+                if (!(faultTypes.length == 0)) {
+                        throw new InvalidOperationException(
+                             "Method should not declare exceptions with an @OneWay annotation.",
+                             method);
+                }
+             }
+
             ConversationSequence conversationSequence = ConversationSequence.CONVERSATION_NONE;
             if (method.isAnnotationPresent(EndsConversation.class)) {
                 if (!conversational) {



Mime
View raw message