You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2014/02/21 17:08:03 UTC

[2/2] git commit: Backmerging NPE fix

Backmerging NPE fix


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

Branch: refs/heads/2.7.x-fixes
Commit: f85058df08665e652c5eed5854d5f355ff951311
Parents: 340ba37
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Fri Feb 21 16:07:47 2014 +0000
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Fri Feb 21 16:07:47 2014 +0000

----------------------------------------------------------------------
 .../SecureConversationTokenInterceptorProvider.java             | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/f85058df/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationTokenInterceptorProvider.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationTokenInterceptorProvider.java b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationTokenInterceptorProvider.java
index 32efb3d..9671a36 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationTokenInterceptorProvider.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/policy/interceptors/SecureConversationTokenInterceptorProvider.java
@@ -26,6 +26,7 @@ import java.util.logging.Logger;
 import org.apache.cxf.binding.soap.Soap11;
 import org.apache.cxf.binding.soap.SoapMessage;
 import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.interceptor.Fault;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.ws.policy.AbstractPolicyInterceptorProvider;
 import org.apache.cxf.ws.policy.AssertionInfoMap;
@@ -65,6 +66,10 @@ public class SecureConversationTokenInterceptorProvider extends AbstractPolicyIn
                             AssertionInfoMap aim,
                             SecureConversationToken itok,
                             boolean endorse) {
+        if (itok.getBootstrapPolicy() == null) {
+            throw new Fault("The SecureConversationToken does not define a BootstrapPolicy", LOG);
+        }
+
         client.setTrust(NegotiationUtils.getTrust10(aim));
         client.setTrust(NegotiationUtils.getTrust13(aim));
         Policy pol = itok.getBootstrapPolicy();