cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1312002 - /cxf/branches/2.5.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/EffectivePolicyImpl.java
Date Tue, 10 Apr 2012 21:29:07 GMT
Author: dkulp
Date: Tue Apr 10 21:29:07 2012
New Revision: 1312002

URL: http://svn.apache.org/viewvc?rev=1312002&view=rev
Log:
Add an NPE guard

Modified:
    cxf/branches/2.5.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/EffectivePolicyImpl.java

Modified: cxf/branches/2.5.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/EffectivePolicyImpl.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/EffectivePolicyImpl.java?rev=1312002&r1=1312001&r2=1312002&view=diff
==============================================================================
--- cxf/branches/2.5.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/EffectivePolicyImpl.java
(original)
+++ cxf/branches/2.5.x-fixes/rt/ws/policy/src/main/java/org/apache/cxf/ws/policy/EffectivePolicyImpl.java
Tue Apr 10 21:29:07 2012
@@ -221,18 +221,20 @@ public class EffectivePolicyImpl impleme
                                  boolean fault) {
         QName qn = a.getName();
         PolicyInterceptorProvider pp = reg.get(qn);
-        List<Interceptor<? extends org.apache.cxf.message.Message>> i = null;
-        if (useIn & !fault) {
-            i = pp.getInInterceptors();
-        } else if (!useIn && !fault) {
-            i = pp.getOutInterceptors();
-        } else if (useIn && fault) {
-            i = pp.getInFaultInterceptors();
-        } else if (!useIn && fault) {
-            i = pp.getOutFaultInterceptors();
-        }
-        if (i != null) {
-            out.addAll(i);
+        if (pp != null) {
+            List<Interceptor<? extends org.apache.cxf.message.Message>> i = null;
+            if (useIn & !fault) {
+                i = pp.getInInterceptors();
+            } else if (!useIn && !fault) {
+                i = pp.getOutInterceptors();
+            } else if (useIn && fault) {
+                i = pp.getInFaultInterceptors();
+            } else if (!useIn && fault) {
+                i = pp.getOutFaultInterceptors();
+            }
+            if (i != null) {
+                out.addAll(i);
+            }
         }
 
         if (a instanceof PolicyContainingAssertion) {



Mime
View raw message