[java-opensaml COMMIT] /trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/common/profile/logic/EntityAttributes...

noreply at shibboleth.net noreply at shibboleth.net
Thu Sep 24 14:12:53 EDT 2015


Author: scantor
Date: Thu Sep 24 14:12:53 2015
New Revision: 4340

URL: http://svn.shibboleth.net/view/java-opensaml?rev=4340&view=rev
Log:
Add a simpler constructor that auto-trims.

Modified:
    trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/common/profile/logic/EntityAttributesPredicate.java

Modified: trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/common/profile/logic/EntityAttributesPredicate.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/common/profile/logic/EntityAttributesPredicate.java?rev=4340&r1=4339&r2=4340&view=diff
==============================================================================
--- trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/common/profile/logic/EntityAttributesPredicate.java	(original)
+++ trunk/opensaml-saml-api/src/main/java/org/opensaml/saml/common/profile/logic/EntityAttributesPredicate.java	Thu Sep 24 14:12:53 2015
@@ -73,7 +73,22 @@
     
     /** Candidates to check for. */
     @Nonnull @NonnullElements private final Collection<Candidate> candidateSet;
-    
+
+    /**
+     * Constructor.
+     * 
+     * @param candidates the {@link Candidate} criteria to check for
+     */
+    public EntityAttributesPredicate(@Nonnull @NonnullElements final Collection<Candidate> candidates) {
+        
+        Constraint.isNotNull(candidates, "Attribute collection cannot be null");
+        
+        candidateSet = new ArrayList<>(Collections2.filter(candidates, Predicates.notNull()));
+        
+        trimTags = true;
+        matchAll = false;
+    }
+
     /**
      * Constructor.
      * 



More information about the commits mailing list