Author: owulff
Date: Wed Jan 11 21:34:33 2012
New Revision: 1230262

URL: http://svn.apache.org/viewvc?rev=1230262&view=rev
Log:
Failing sts systest fixed

Modified:
    
cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomAttributeStatementProvider.java

Modified: 
cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomAttributeStatementProvider.java
URL: 
http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomAttributeStatementProvider.java?rev=1230262&r1=1230261&r2=1230262&view=diff
==============================================================================
--- 
cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomAttributeStatementProvider.java
 (original)
+++ 
cxf/branches/2.5.x-fixes/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/deployment/CustomAttributeStatementProvider.java
 Wed Jan 11 21:34:33 2012
@@ -49,15 +49,18 @@ public class CustomAttributeStatementPro
                     providerParameters.getRealm()
                 );
         }
-
-        List<AttributeBean> attributeList = new ArrayList<AttributeBean>();
-        String tokenType = 
providerParameters.getTokenRequirements().getTokenType();
-
+        if (retrievedClaims == null) {
+            return null;
+        }
+        
         Iterator<Claim> claimIterator = retrievedClaims.iterator();
         if (!claimIterator.hasNext()) {
             return null;
         }
 
+        List<AttributeBean> attributeList = new ArrayList<AttributeBean>();
+        String tokenType = 
providerParameters.getTokenRequirements().getTokenType();
+
         AttributeStatementBean attrBean = new AttributeStatementBean();
         while (claimIterator.hasNext()) {
             Claim claim = claimIterator.next();


Reply via email to