diff options
Diffstat (limited to 'branches/sca-java-1.x/modules/binding-erlang-runtime/src/main/java/org/apache/tuscany/sca/binding/erlang/impl/ErlangInvoker.java')
-rw-r--r-- | branches/sca-java-1.x/modules/binding-erlang-runtime/src/main/java/org/apache/tuscany/sca/binding/erlang/impl/ErlangInvoker.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/branches/sca-java-1.x/modules/binding-erlang-runtime/src/main/java/org/apache/tuscany/sca/binding/erlang/impl/ErlangInvoker.java b/branches/sca-java-1.x/modules/binding-erlang-runtime/src/main/java/org/apache/tuscany/sca/binding/erlang/impl/ErlangInvoker.java index 2fe9ae38b9..a2cf71a053 100644 --- a/branches/sca-java-1.x/modules/binding-erlang-runtime/src/main/java/org/apache/tuscany/sca/binding/erlang/impl/ErlangInvoker.java +++ b/branches/sca-java-1.x/modules/binding-erlang-runtime/src/main/java/org/apache/tuscany/sca/binding/erlang/impl/ErlangInvoker.java @@ -62,6 +62,7 @@ public class ErlangInvoker implements Invoker { } else {
// NOTE: don't throw exception if not declared
// TODO: externalize message?
+ msg.setBody(null);
logger
.log(Level.WARNING, "Problem while sending/receiving data",
e);
@@ -82,7 +83,11 @@ public class ErlangInvoker implements Invoker { node.setCookie(binding.getCookie());
}
tmpMbox = node.createMbox();
- Object[] args = msg.getBody();
+ // obtain args, make sure they aren't null
+ // NOTE: sending message with no content (but only with senders PID)
+ // is possible
+ Object[] args = (Object[]) (msg.getBody() != null ? msg.getBody()
+ : new Object[0]);
Method jmethod = ((JavaOperation) msg.getOperation())
.getJavaMethod();
// create and send msg with self pid in the beginning
|