You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by sa...@apache.org on 2006/07/14 14:35:23 UTC

svn commit: r421893 - /webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/OperationContext.java

Author: saminda
Date: Fri Jul 14 05:35:22 2006
New Revision: 421893

URL: http://svn.apache.org/viewvc?rev=421893&view=rev
Log:
preventing a null pointer 

Modified:
    webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/OperationContext.java

Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/OperationContext.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/OperationContext.java?rev=421893&r1=421892&r2=421893&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/OperationContext.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/context/OperationContext.java Fri Jul 14 05:35:22 2006
@@ -66,12 +66,14 @@
      * @param serviceContext the parent ServiceContext representing any state related to
      *                       the set of all operations of the service.
      */
-    public OperationContext(AxisOperation axisOperation, ServiceContext serviceContext) {
+    public OperationContext(AxisOperation axisOperation,
+                            ServiceContext serviceContext) {
         super(serviceContext);
         this.messageContexts = new HashMap();
         this.axisOperation = axisOperation;
         this.operationContextMap =
-                getServiceContext().getConfigurationContext().getOperationContextMap();
+                getServiceContext().getConfigurationContext()
+                        .getOperationContextMap();
     }
 
     /**
@@ -101,7 +103,9 @@
      * being complete due to the optional nature of the MEP.
      */
     public void cleanup() {
-        operationContextMap.remove(key);
+        if (key != null) {
+            operationContextMap.remove(key);
+        }
     }
 
     /**
@@ -125,7 +129,8 @@
      * @return Returns MessageContext.
      * @throws AxisFault
      */
-    public MessageContext getMessageContext(String messageLabel) throws AxisFault {
+    public MessageContext getMessageContext(String messageLabel)
+            throws AxisFault {
         return (MessageContext) messageContexts.get(messageLabel);
     }
 
@@ -157,7 +162,8 @@
     public void setParent(AbstractContext context) {
         super.setParent(context);
         this.operationContextMap =
-                getServiceContext().getConfigurationContext().getOperationContextMap();
+                getServiceContext().getConfigurationContext()
+                        .getOperationContextMap();
     }
 
     public void setKey(String key) {



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