ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1737651 - /webservices/wss4j/branches/2_0_x-fixes/policy/src/main/java/org/apache/wss4j/policy/model/AbstractSecurityAssertion.java
Date Mon, 04 Apr 2016 10:45:12 GMT
Author: coheigea
Date: Mon Apr  4 10:45:12 2016
New Revision: 1737651

URL: http://svn.apache.org/viewvc?rev=1737651&view=rev
Log:
Avoid NPE

Modified:
    webservices/wss4j/branches/2_0_x-fixes/policy/src/main/java/org/apache/wss4j/policy/model/AbstractSecurityAssertion.java

Modified: webservices/wss4j/branches/2_0_x-fixes/policy/src/main/java/org/apache/wss4j/policy/model/AbstractSecurityAssertion.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/branches/2_0_x-fixes/policy/src/main/java/org/apache/wss4j/policy/model/AbstractSecurityAssertion.java?rev=1737651&r1=1737650&r2=1737651&view=diff
==============================================================================
--- webservices/wss4j/branches/2_0_x-fixes/policy/src/main/java/org/apache/wss4j/policy/model/AbstractSecurityAssertion.java
(original)
+++ webservices/wss4j/branches/2_0_x-fixes/policy/src/main/java/org/apache/wss4j/policy/model/AbstractSecurityAssertion.java
Mon Apr  4 10:45:12 2016
@@ -168,10 +168,12 @@ public abstract class AbstractSecurityAs
 
     public boolean isAsserted(Map<QName, List<AssertionState>> assertionStatesMap)
{
         List<AssertionState> assertionStateList = assertionStatesMap.get(getName());
-        for (int i = 0; i < assertionStateList.size(); i++) {
-            AssertionState assertionState = assertionStateList.get(i);
-            if (assertionState.getAssertion() == this && !assertionState.isAsserted())
{
-                return false;
+        if (assertionStateList != null) {
+            for (int i = 0; i < assertionStateList.size(); i++) {
+                AssertionState assertionState = assertionStateList.get(i);
+                if (assertionState.getAssertion() == this && !assertionState.isAsserted())
{
+                    return false;
+                }
             }
         }
         return true;



Mime
View raw message