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 di...@apache.org on 2008/03/20 17:41:14 UTC

svn commit: r639348 - /webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/EndpointController.java

Author: dims
Date: Thu Mar 20 09:41:02 2008
New Revision: 639348

URL: http://svn.apache.org/viewvc?rev=639348&view=rev
Log:
prevent NPE

Modified:
    webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/EndpointController.java

Modified: webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/EndpointController.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/EndpointController.java?rev=639348&r1=639347&r2=639348&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/EndpointController.java (original)
+++ webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/server/EndpointController.java Thu Mar 20 09:41:02 2008
@@ -320,15 +320,18 @@
         } finally {
         	// at this point, we are done with handler instances on the server; call @PreDestroy on all of them
             HandlerLifecycleManager hlm = createHandlerlifecycleManager();
-            for (Iterator it = eic.getHandlers().iterator(); it.hasNext();) {
-				try {
-					Handler handler = (Handler) it.next();
-					hlm.destroyHandlerInstance(request, handler);
-				} catch (Exception e) {
-					// TODO: can we ignore this?
-					throw ExceptionFactory.makeWebServiceException(e);
-				}
-			}
+            List<Handler> list = eic.getHandlers();
+            if(list != null) {
+                for (Iterator it = list.iterator(); it.hasNext();) {
+                    try {
+                        Handler handler = (Handler) it.next();
+                        hlm.destroyHandlerInstance(request, handler);
+                    } catch (Exception e) {
+                        // TODO: can we ignore this?
+                        throw ExceptionFactory.makeWebServiceException(e);
+                    }
+                }
+            }
             responseReady(eic);
             restoreRequestMessage(request);
         }



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