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 2013/07/16 14:44:21 UTC

svn commit: r1503691 - /cxf/branches/2.7.x-fixes/rt/security/src/main/java/org/apache/cxf/rt/security/xacml/DefaultXACMLRequestBuilder.java

Author: coheigea
Date: Tue Jul 16 12:44:20 2013
New Revision: 1503691

URL: http://svn.apache.org/r1503691
Log:
Revert "Send the Resources as a single Attribute"

This reverts commit 01f8d743e56260f3c42a2541a6f121e9595d9a75.

Modified:
    cxf/branches/2.7.x-fixes/rt/security/src/main/java/org/apache/cxf/rt/security/xacml/DefaultXACMLRequestBuilder.java

Modified: cxf/branches/2.7.x-fixes/rt/security/src/main/java/org/apache/cxf/rt/security/xacml/DefaultXACMLRequestBuilder.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/security/src/main/java/org/apache/cxf/rt/security/xacml/DefaultXACMLRequestBuilder.java?rev=1503691&r1=1503690&r2=1503691&view=diff
==============================================================================
--- cxf/branches/2.7.x-fixes/rt/security/src/main/java/org/apache/cxf/rt/security/xacml/DefaultXACMLRequestBuilder.java (original)
+++ cxf/branches/2.7.x-fixes/rt/security/src/main/java/org/apache/cxf/rt/security/xacml/DefaultXACMLRequestBuilder.java Tue Jul 16 12:44:20 2013
@@ -119,25 +119,20 @@ public class DefaultXACMLRequestBuilder 
         
         // Resource
         attributes.clear();
-        List<AttributeValueType> resourceAttributes = new ArrayList<AttributeValueType>();
         for (String resource : resources) {
             if (resource != null) {
                 AttributeValueType resourceAttributeValue = 
                     RequestComponentBuilder.createAttributeValueType(resource);
-                resourceAttributes.add(resourceAttributeValue);
+                AttributeType resourceAttribute = 
+                    RequestComponentBuilder.createAttributeType(
+                            XACMLConstants.RESOURCE_ID,
+                            XACMLConstants.XS_STRING,
+                            null,
+                            Collections.singletonList(resourceAttributeValue)
+                    );
+                attributes.add(resourceAttribute);
             }
         }
-        
-        if (!resourceAttributes.isEmpty()) {
-            AttributeType resourceAttribute = 
-                RequestComponentBuilder.createAttributeType(
-                        XACMLConstants.RESOURCE_ID,
-                        XACMLConstants.XS_STRING,
-                        null,
-                        resourceAttributes
-                );
-            attributes.add(resourceAttribute);
-        }
         ResourceType resourceType = RequestComponentBuilder.createResourceType(attributes, null);
         
         // Action