cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r889067 - /cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletController.java
Date Thu, 10 Dec 2009 03:15:38 GMT
Author: dkulp
Date: Thu Dec 10 03:15:37 2009
New Revision: 889067

URL: http://svn.apache.org/viewvc?rev=889067&view=rev
Log:
[CXF-2551] Add some NPE checks into the ServletController

Modified:
    cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletController.java

Modified: cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletController.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletController.java?rev=889067&r1=889066&r2=889067&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletController.java
(original)
+++ cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletController.java
Thu Dec 10 03:15:37 2009
@@ -89,8 +89,14 @@
         for (String path : paths) {
             ServletDestination d2 = transport.getDestinationForPath(path);
             String ad = d2.getEndpointInfo().getAddress();
-            if (ad.equals(path)
-                || ad.equals(lastBase + path)) {
+            if (ad == null 
+                && d2.getAddress() != null
+                && d2.getAddress().getAddress() != null) {
+                ad = d2.getAddress().getAddress().getValue();
+            }
+            if (ad != null 
+                && (ad.equals(path)
+                || ad.equals(lastBase + path))) {
                 d2.getEndpointInfo().setAddress(base + path);
                 if (d2.getEndpointInfo().getExtensor(AddressType.class) != null) {
                     d2.getEndpointInfo().getExtensor(AddressType.class).setLocation(base
+ path);



Mime
View raw message