cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dsosno...@apache.org
Subject [2/2] git commit: [CXF-5725] Fix NPE when no Accept for Offer
Date Fri, 02 May 2014 00:22:12 GMT
[CXF-5725] Fix NPE when no Accept for Offer

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

Branch: refs/heads/master
Commit: 95d6cfcd27d16d37497875125a1a0c6aa276fcd5
Parents: 021646d
Author: dsosnoski <dsosnoski@apache.org>
Authored: Fri May 2 11:29:41 2014 +1200
Committer: dsosnoski <dsosnoski@apache.org>
Committed: Fri May 2 12:13:21 2014 +1200

----------------------------------------------------------------------
 .../src/main/java/org/apache/cxf/ws/rm/Servant.java  | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/95d6cfcd/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Servant.java
----------------------------------------------------------------------
diff --git a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Servant.java b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Servant.java
index 319e320..96d86b3 100644
--- a/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Servant.java
+++ b/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/Servant.java
@@ -214,13 +214,14 @@ public class Servant implements Invoker {
         Identifier offeredId = reliableEndpoint.getProxy().getOfferedIdentifier();
         if (null != offeredId) {
             AcceptType accept = createResponse.getAccept();
-            assert null != accept;
-            Destination dest = reliableEndpoint.getDestination();
-            String address = accept.getAcksTo().getAddress().getValue();
-            if (!RMUtils.getAddressingConstants().getNoneURI().equals(address)) {
-                DestinationSequence ds =  new DestinationSequence(offeredId, accept.getAcksTo(),
dest,
-                    protocol);
-                dest.addSequence(ds);
+            if (accept != null) {
+                Destination dest = reliableEndpoint.getDestination();
+                String address = accept.getAcksTo().getAddress().getValue();
+                if (!RMUtils.getAddressingConstants().getNoneURI().equals(address)) {
+                    DestinationSequence ds =  new DestinationSequence(offeredId, accept.getAcksTo(),
dest,
+                                                                      protocol);
+                    dest.addSequence(ds);
+                }
             }
         }
     }


Mime
View raw message