cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1393574 - /cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyAnnotationListener.java
Date Wed, 03 Oct 2012 16:03:20 GMT
Author: dkulp
Date: Wed Oct  3 16:03:20 2012
New Revision: 1393574

URL: http://svn.apache.org/viewvc?rev=1393574&view=rev
Log:
[CXF-4526] Add an NPE guard

Modified:
    cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyAnnotationListener.java

Modified: cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyAnnotationListener.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyAnnotationListener.java?rev=1393574&r1=1393573&r2=1393574&view=diff
==============================================================================
--- cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyAnnotationListener.java
(original)
+++ cxf/trunk/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/PolicyAnnotationListener.java
Wed Oct  3 16:03:20 2012
@@ -20,6 +20,7 @@
 package org.apache.cxf.ws.policy;
 
 import java.lang.reflect.Method;
+import java.net.URL;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
@@ -358,7 +359,10 @@ public class PolicyAnnotationListener im
             
             if (service.getDescription() == null && cls != null) {
                 service.setDescription(new DescriptionInfo());
-                service.getDescription().setBaseURI(cls.getResource("/").toString());
+                URL u = cls.getResource("/");
+                if (u != null) {
+                    service.getDescription().setBaseURI(u.toString());
+                }
             }
 
             // if not already added to service add it, otherwise ignore 



Mime
View raw message