cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r763200 - /cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/servlet/ServletController.java
Date Wed, 08 Apr 2009 12:07:17 GMT
Author: sergeyb
Date: Wed Apr  8 12:07:17 2009
New Revision: 763200

URL: http://svn.apache.org/viewvc?rev=763200&view=rev
Log:
Fixing NPE caused by JAXRS endpoints

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=763200&r1=763199&r2=763200&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
Wed Apr  8 12:07:17 2009
@@ -276,6 +276,12 @@
                 transport.getDestinations());
         Collections.sort(destinations, new Comparator<ServletDestination>() {
             public int compare(ServletDestination o1, ServletDestination o2) {
+                if (o1.getEndpointInfo().getInterface() == null) {
+                    return -1;
+                }
+                if (o2.getEndpointInfo().getInterface() == null) {
+                    return 1;
+                }
                 return o1.getEndpointInfo().getInterface().getName()
                         .getLocalPart().compareTo(
                                 o2.getEndpointInfo().getInterface().getName()



Mime
View raw message