ode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From va...@apache.org
Subject [4/7] git commit: Allowing arbitrary return types for the OO part.
Date Wed, 14 Aug 2013 23:43:16 GMT
Allowing arbitrary return types for the OO part.


Project: http://git-wip-us.apache.org/repos/asf/ode-jacob/repo
Commit: http://git-wip-us.apache.org/repos/asf/ode-jacob/commit/a9555ba6
Tree: http://git-wip-us.apache.org/repos/asf/ode-jacob/tree/a9555ba6
Diff: http://git-wip-us.apache.org/repos/asf/ode-jacob/diff/a9555ba6

Branch: refs/heads/master
Commit: a9555ba6c621216c6d1a5cd566d80cbb3f172b0b
Parents: 9a3382b
Author: Tammo van Lessen <vanto@apache.org>
Authored: Wed Aug 14 22:58:41 2013 +0200
Committer: Tammo van Lessen <vanto@apache.org>
Committed: Wed Aug 14 22:58:41 2013 +0200

----------------------------------------------------------------------
 src/main/java/org/apache/ode/jacob/vpu/JacobVPU.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ode-jacob/blob/a9555ba6/src/main/java/org/apache/ode/jacob/vpu/JacobVPU.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/ode/jacob/vpu/JacobVPU.java b/src/main/java/org/apache/ode/jacob/vpu/JacobVPU.java
index 462846f..10f3631 100644
--- a/src/main/java/org/apache/ode/jacob/vpu/JacobVPU.java
+++ b/src/main/java/org/apache/ode/jacob/vpu/JacobVPU.java
@@ -256,15 +256,15 @@ public final class JacobVPU {
 
             _statistics.messagesSent++;
 
-            Synch replyChannel = null;
+            Channel replyChannel = null;
             CommChannel replyCommChannel = null;
             // Check for synchronous methods; create a synchronization channel
             if (method.getReturnType() != void.class) {
-                if (method.getReturnType() != Synch.class) {
+                if (!Channel.class.isAssignableFrom(method.getReturnType())) {
                     throw new IllegalStateException(
-                        "Channel method '" + method + "' must only return void or Synch");
+                        "Channel method '" + method + "' must only return void or an implementation
of " + Channel.class.getName());
                 }
-                replyChannel = (Synch)newChannel(Synch.class, "", "Reply Channel");
+                replyChannel = newChannel(method.getReturnType(), "", "Reply Channel");
                 replyCommChannel = (CommChannel) ChannelFactory.getBackend((Channel)replyChannel);
             }
             


Mime
View raw message