cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject cxf git commit: [CXF-6257] Creating and Endpoint using JAX-WS API, getting the binding and then publishing causes a NullPointerException
Date Thu, 26 Mar 2015 15:36:49 GMT
Repository: cxf
Updated Branches:
  refs/heads/2.7.x-fixes 4906110d3 -> 7247aa82e


[CXF-6257] Creating and Endpoint using JAX-WS API, getting the binding and then publishing
causes a NullPointerException


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/7247aa82
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/7247aa82
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/7247aa82

Branch: refs/heads/2.7.x-fixes
Commit: 7247aa82e3b3057ea171989173fa6478199002d2
Parents: 4906110
Author: Akitoshi Yoshida <ay@apache.org>
Authored: Thu Mar 26 16:27:29 2015 +0100
Committer: Akitoshi Yoshida <ay@apache.org>
Committed: Thu Mar 26 16:36:04 2015 +0100

----------------------------------------------------------------------
 api/src/main/java/org/apache/cxf/service/model/EndpointInfo.java   | 2 +-
 .../jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/7247aa82/api/src/main/java/org/apache/cxf/service/model/EndpointInfo.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/cxf/service/model/EndpointInfo.java b/api/src/main/java/org/apache/cxf/service/model/EndpointInfo.java
index a28feaa..d6ede6e 100644
--- a/api/src/main/java/org/apache/cxf/service/model/EndpointInfo.java
+++ b/api/src/main/java/org/apache/cxf/service/model/EndpointInfo.java
@@ -89,7 +89,7 @@ public class EndpointInfo extends AbstractDescriptionElement implements
NamedIte
     }    
     
     public String getAddress() {
-        return (null != address) ? address.getAddress().getValue() : null;
+        return (null != address && null != address.getAddress()) ? address.getAddress().getValue()
: null;
     }
     
     public void setAddress(String addr) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/7247aa82/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java
index ca220be..3aa4441 100644
--- a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java
+++ b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/EndpointImpl.java
@@ -334,7 +334,7 @@ public class EndpointImpl extends javax.xml.ws.Endpoint
             serv = getServer(addr);
             if (addr != null) {            
                 EndpointInfo endpointInfo = serv.getEndpoint().getEndpointInfo();
-                if (!endpointInfo.getAddress().contains(addr)) {
+                if (endpointInfo.getAddress() == null || !endpointInfo.getAddress().contains(addr))
{
                     endpointInfo.setAddress(addr);
                 }
                 if (publishedEndpointUrl != null) {


Mime
View raw message