axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davidills...@apache.org
Subject svn commit: r475441 - /webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/CallbackReceiver.java
Date Wed, 15 Nov 2006 21:37:16 GMT
Author: davidillsley
Date: Wed Nov 15 13:37:15 2006
New Revision: 475441

URL: http://svn.apache.org/viewvc?view=rev&rev=475441
Log:
Merge changes from r471671
Replace NPE with specific exception to improve clarity of a failure case.

Modified:
    webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/CallbackReceiver.java

Modified: webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/CallbackReceiver.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/CallbackReceiver.java?view=diff&rev=475441&r1=475440&r2=475441
==============================================================================
--- webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/CallbackReceiver.java
(original)
+++ webservices/axis2/trunk/java/modules/kernel/src/org/apache/axis2/util/CallbackReceiver.java
Wed Nov 15 13:37:15 2006
@@ -16,18 +16,17 @@
 
 package org.apache.axis2.util;
 
+import java.util.HashMap;
+
 import org.apache.axiom.soap.SOAPEnvelope;
 import org.apache.axiom.soap.SOAPFault;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.addressing.RelatesTo;
-import org.apache.axis2.addressing.AddressingConstants;
 import org.apache.axis2.client.async.AsyncResult;
 import org.apache.axis2.client.async.Callback;
 import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.engine.MessageReceiver;
 
-import java.util.HashMap;
-
 /**
  * This is a MessageReceiver which is used on the client side to accept the
  * messages (response) that come to the client. This correlates the incoming message to
@@ -47,6 +46,9 @@
 
     public void receive(MessageContext messageCtx) throws AxisFault {
         RelatesTo relatesTO = messageCtx.getOptions().getRelatesTo();
+        if(relatesTO == null){
+            throw new AxisFault("Cannot identify correct Callback object. RelatesTo is null");
+        }
         String messageID = relatesTO.getValue();
         Callback callback = (Callback) callbackStore.get(messageID);
 		AsyncResult result = new AsyncResult(messageCtx);



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message