[java-identity-provider] branch master updated: Add some component init checks.

Scott Cantor cantor.2 at osu.edu
Thu May 23 08:26:04 EDT 2019


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch master
in repository java-identity-provider.

View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=3e079d13905c106761aeb4ab3de9c249b1a0192a

The following commit(s) were added to refs/heads/master by this push:
       new  3e079d1   Add some component init checks.
3e079d1 is described below

commit 3e079d13905c106761aeb4ab3de9c249b1a0192a
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Thu May 23 08:26:00 2019 -0400

    Add some component init checks.
---
 .../filter/matcher/saml/impl/AttributeInMetadataMatcher.java      | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/matcher/saml/impl/AttributeInMetadataMatcher.java b/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/matcher/saml/impl/AttributeInMetadataMatcher.java
index 20bc142..4e1ce3f 100644
--- a/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/matcher/saml/impl/AttributeInMetadataMatcher.java
+++ b/idp-attribute-filter-impl/src/main/java/net/shibboleth/idp/attribute/filter/matcher/saml/impl/AttributeInMetadataMatcher.java
@@ -102,6 +102,8 @@ public class AttributeInMetadataMatcher extends AbstractIdentifiableInitializabl
      * @param flag whether optionally requested attributes should be matched
      */
     public void setOnlyIfRequired(final boolean flag) {
+        ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
+        
         onlyIfRequired = flag;
     }
 
@@ -120,6 +122,8 @@ public class AttributeInMetadataMatcher extends AbstractIdentifiableInitializabl
      * @param flag whether to match if the metadata contains no AttributeConsumingService
      */
     public void setMatchIfMetadataSilent(final boolean flag) {
+        ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
+        
         matchIfMetadataSilent = flag;
     }
 
@@ -142,6 +146,8 @@ public class AttributeInMetadataMatcher extends AbstractIdentifiableInitializabl
      * @param name the Name to look for
      */
     public void setAttributeName(@Nullable @NotEmpty final String name) {
+        ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
+        
         attributeName = StringSupport.trimOrNull(name);
     }
 
@@ -164,6 +170,8 @@ public class AttributeInMetadataMatcher extends AbstractIdentifiableInitializabl
      * @param format the NameFormat to look for
      */
     public void setAttributeNameFormat(@Nullable @NotEmpty final String format) {
+        ComponentSupport.ifInitializedThrowUnmodifiabledComponentException(this);
+        
         attributeNameFormat = StringSupport.trimOrNull(format);
         if (attributeNameFormat != null && Attribute.UNSPECIFIED.equals(attributeNameFormat)) {
             attributeNameFormat = null;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list