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 2008/05/14 11:43:12 UTC
svn commit: r656190 -
/incubator/tuscany/java/sca/modules/interface-java/src/main/java/org/apache/tuscany/sca/interfacedef/java/impl/JavaInterfaceIntrospectorImpl.java
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) {