[java-identity-provider COMMIT] in /trunk/idp-authn-api: pom.xml src/main/java/net/shibboleth/idp/authn/SubjectCanoni...

noreply at shibboleth.net noreply at shibboleth.net
Mon Sep 8 17:41:34 EDT 2014


Author: tzeller
Date: Mon Sep  8 17:41:34 2014
New Revision: 6507

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=6507&view=rev
Log:
Throw unmodifiable exception in setter after initialization.

Added:
    trunk/idp-authn-api/src/test/java/net/shibboleth/idp/authn/SubjectCanonicalizationFlowDescriptorTest.java   (with props)
Modified:
    trunk/idp-authn-api/pom.xml
    trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/SubjectCanonicalizationFlowDescriptor.java

Modified: trunk/idp-authn-api/pom.xml
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-authn-api/pom.xml?rev=6507&r1=6506&r2=6507&view=diff
==============================================================================
--- trunk/idp-authn-api/pom.xml (original)
+++ trunk/idp-authn-api/pom.xml Mon Sep  8 17:41:34 2014
@@ -56,6 +56,13 @@
         </dependency>
 
         <!-- Test Dependencies -->
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>idp-profile-api</artifactId>
+            <version>${project.version}</version>
+            <scope>test</scope>
+            <type>test-jar</type>
+        </dependency>
         
     </dependencies>
     

Modified: trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/SubjectCanonicalizationFlowDescriptor.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/SubjectCanonicalizationFlowDescriptor.java?rev=6507&r1=6506&r2=6507&view=diff
==============================================================================
--- trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/SubjectCanonicalizationFlowDescriptor.java (original)
+++ trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/SubjectCanonicalizationFlowDescriptor.java Mon Sep  8 17:41:34 2014
@@ -20,11 +20,12 @@
 import javax.annotation.Nonnull;
 
 import net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent;
+import net.shibboleth.utilities.java.support.component.ComponentSupport;
 import net.shibboleth.utilities.java.support.logic.Constraint;
 
 import org.opensaml.profile.context.ProfileRequestContext;
 
-import com.google.common.base.Objects;
+import com.google.common.base.MoreObjects;
 import com.google.common.base.Predicate;
 import com.google.common.base.Predicates;
 
@@ -57,6 +58,7 @@
      * @param condition predicate that controls activation of the flow
      */
     public void setActivationCondition(@Nonnull final Predicate<ProfileRequestContext> condition) {
+        ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
         activationCondition = Constraint.isNotNull(condition, "Activation condition predicate cannot be null");
     }
 
@@ -89,7 +91,7 @@
 
     /** {@inheritDoc} */
     @Override public String toString() {
-        return Objects.toStringHelper(this).add("flowId", getId()).toString();
+        return MoreObjects.toStringHelper(this).add("flowId", getId()).toString();
     }
 
 }



More information about the commits mailing list