[java-identity-provider COMMIT] in /trunk/idp-attribute-filter-impl/src: main/java/net/shibboleth/idp/attribute/filte...

noreply at shibboleth.net noreply at shibboleth.net
Mon Oct 20 12:22:17 EDT 2014


Author: rdw
Date: Mon Oct 20 12:22:17 2014
New Revision: 6750

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=6750&view=rev
Log:
IDP-258 TODOs

Modified:
    trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/policyrule/impl/ScriptedPolicyRule.java
    trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/policyrule/saml/impl/AbstractEntityAttributePolicyRule.java
    trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/complex/impl/BaseComplexAttributeFilterTestCase.java

Modified: trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/policyrule/impl/ScriptedPolicyRule.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/policyrule/impl/ScriptedPolicyRule.java?rev=6750&r1=6749&r2=6750&view=diff
==============================================================================
--- trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/policyrule/impl/ScriptedPolicyRule.java (original)
+++ trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/policyrule/impl/ScriptedPolicyRule.java Mon Oct 20 12:22:17 2014
@@ -174,7 +174,6 @@
         }
     }
 
-    // TODO do we still need this?
     /** {@inheritDoc} */
     @Override public boolean equals(Object obj) {
         if (obj == null) {

Modified: trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/policyrule/saml/impl/AbstractEntityAttributePolicyRule.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/policyrule/saml/impl/AbstractEntityAttributePolicyRule.java?rev=6750&r1=6749&r2=6750&view=diff
==============================================================================
--- trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/policyrule/saml/impl/AbstractEntityAttributePolicyRule.java (original)
+++ trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/policyrule/saml/impl/AbstractEntityAttributePolicyRule.java Mon Oct 20 12:22:17 2014
@@ -104,6 +104,7 @@
      * 
      * @return whether the entity has the configured attribute {@inheritDoc}
      */
+    @Override
     public Tristate matches(@Nonnull AttributeFilterContext filterContext) {
 
         Constraint.isNotNull(filterContext, "Context must be supplied");
@@ -164,6 +165,7 @@
      * 
      * @return the entity or null if the metadata does not contain such an entity attribute
      */
+    // Checkstyle: CyclomaticComplexity OFF
     @Nullable protected Attribute getEntityAttribute(EntityDescriptor entityDescriptor) {
         List<XMLObject> entityAttributesCollection = null;
         if (entityDescriptor.getExtensions() != null) {
@@ -188,22 +190,6 @@
             return null;
         }
 
-        //  TODO this is syntatic sugar for checkstyle.  Remove and relax the rules. 
-        return compareAttributes(entityAttributes, entityDescriptor);
-    }
-
-    /**
-     * Helper function for {@link #getEntityAttribute(EntityDescriptor)}. Having done all the null checking in
-     * {@link #getEntityAttribute(EntityDescriptor)}, this function actually does the match as per the rules:<br/>
-     * If both the attribute name and name format for this match functor is configured then both must match, otherwise
-     * only the attribute name must match.
-     * 
-     * @param entityAttributes the list of attributes
-     * @param entityDescriptor the entity in question
-     * @return an attribute that matches or null
-     */
-    @Nullable private Attribute compareAttributes(List<Attribute> entityAttributes, EntityDescriptor entityDescriptor) {
-
         for (Attribute entityAttribute : entityAttributes) {
             if (!Objects.equals(getAttributeName(), entityAttribute.getName())) {
                 continue;
@@ -221,8 +207,10 @@
                 new Object[] {getLogPrefix(), entityDescriptor.getEntityID(), getAttributeName(), getNameFormat()});
         return null;
     }
-
+    // Checkstyle: CyclomaticComplexity ON
+    
     /** {@inheritDoc} */
+    @Override
     protected void doInitialize() throws ComponentInitializationException {
         super.doInitialize();
         if (attrName == null) {

Modified: trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/complex/impl/BaseComplexAttributeFilterTestCase.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/complex/impl/BaseComplexAttributeFilterTestCase.java?rev=6750&r1=6749&r2=6750&view=diff
==============================================================================
--- trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filter/complex/impl/BaseComplexAttributeFilterTestCase.java (original)

[... 21 lines stripped ...]


More information about the commits mailing list