[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 Mar 18 12:17:40 EDT 2013
Author: rdw
Date: Mon Mar 18 12:17:40 2013
New Revision: 4342
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=4342&view=rev
Log:
IDP-207 Do not allow Targetted Match Functors to have their attributeID set after initialization.
Modified:
trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filtering/impl/matcher/attributevalue/AbstractAttributeTargetedRegexMatchFunctor.java
trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filtering/impl/matcher/attributevalue/AbstractAttributeTargetedStringMatchFunctor.java
trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filtering/impl/matcher/attributevalue/TargetedMatchFunctorTest.java
Modified: trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filtering/impl/matcher/attributevalue/AbstractAttributeTargetedRegexMatchFunctor.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filtering/impl/matcher/attributevalue/AbstractAttributeTargetedRegexMatchFunctor.java?rev=4342&r1=4341&r2=4342&view=diff
==============================================================================
--- trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filtering/impl/matcher/attributevalue/AbstractAttributeTargetedRegexMatchFunctor.java (original)
+++ trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filtering/impl/matcher/attributevalue/AbstractAttributeTargetedRegexMatchFunctor.java Mon Mar 18 12:17:40 2013
@@ -25,6 +25,7 @@
import net.shibboleth.idp.attribute.filtering.AttributeFilterContext;
import net.shibboleth.idp.attribute.filtering.impl.matcher.AbstractRegexpStringMatchFunctor;
import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
+import net.shibboleth.utilities.java.support.component.ComponentSupport;
import net.shibboleth.utilities.java.support.primitive.StringSupport;
/**
@@ -44,6 +45,7 @@
/** {@inheritDoc} */
public void setAttributeId(String id) {
+ ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
attributeId = StringSupport.trimOrNull(id);
}
Modified: trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filtering/impl/matcher/attributevalue/AbstractAttributeTargetedStringMatchFunctor.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filtering/impl/matcher/attributevalue/AbstractAttributeTargetedStringMatchFunctor.java?rev=4342&r1=4341&r2=4342&view=diff
==============================================================================
--- trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filtering/impl/matcher/attributevalue/AbstractAttributeTargetedStringMatchFunctor.java (original)
+++ trunk/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filtering/impl/matcher/attributevalue/AbstractAttributeTargetedStringMatchFunctor.java Mon Mar 18 12:17:40 2013
@@ -25,6 +25,7 @@
import net.shibboleth.idp.attribute.filtering.AttributeFilterContext;
import net.shibboleth.idp.attribute.filtering.impl.matcher.AbstractStringMatchFunctor;
import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
+import net.shibboleth.utilities.java.support.component.ComponentSupport;
import net.shibboleth.utilities.java.support.primitive.StringSupport;
/**
@@ -44,6 +45,7 @@
/** {@inheritDoc} */
public void setAttributeId(String id) {
+ ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
attributeId = StringSupport.trimOrNull(id);
}
Modified: trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filtering/impl/matcher/attributevalue/TargetedMatchFunctorTest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filtering/impl/matcher/attributevalue/TargetedMatchFunctorTest.java?rev=4342&r1=4341&r2=4342&view=diff
==============================================================================
--- trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filtering/impl/matcher/attributevalue/TargetedMatchFunctorTest.java (original)
+++ trunk/idp-attribute-filter-impl/src/test/java/net/shibboleth/idp/attribute/filtering/impl/matcher/attributevalue/TargetedMatchFunctorTest.java Mon Mar 18 12:17:40 2013
@@ -18,6 +18,7 @@
package net.shibboleth.idp.attribute.filtering.impl.matcher.attributevalue;
import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
+import net.shibboleth.utilities.java.support.component.UnmodifiableComponentException;
import org.testng.Assert;
@@ -37,6 +38,12 @@
Assert.assertNotEquals(functor.getAttributeId(), NAME.toUpperCase());
functor.initialize();
+ try {
[... 9 lines stripped ...]
More information about the commits
mailing list