[java-identity-provider] branch master updated: Support activationCondition by bean ID.

Scott Cantor cantor.2 at osu.edu
Thu Jul 11 08:54:34 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=150a0f959f6f54fc175912ad7ff54321fbd2bc07

The following commit(s) were added to refs/heads/master by this push:
       new  150a0f9   Support activationCondition by bean ID.
150a0f9 is described below

commit 150a0f959f6f54fc175912ad7ff54321fbd2bc07
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Thu Jul 11 08:54:32 2019 -0400

    Support activationCondition by bean ID.
---
 .../transcoding/impl/AttributeTranscoderRegistryImpl.java      | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/idp-attribute-impl/src/main/java/net/shibboleth/idp/attribute/transcoding/impl/AttributeTranscoderRegistryImpl.java b/idp-attribute-impl/src/main/java/net/shibboleth/idp/attribute/transcoding/impl/AttributeTranscoderRegistryImpl.java
index 00c7f65..1162b6b 100644
--- a/idp-attribute-impl/src/main/java/net/shibboleth/idp/attribute/transcoding/impl/AttributeTranscoderRegistryImpl.java
+++ b/idp-attribute-impl/src/main/java/net/shibboleth/idp/attribute/transcoding/impl/AttributeTranscoderRegistryImpl.java
@@ -260,7 +260,7 @@ public class AttributeTranscoderRegistryImpl extends AbstractServiceableComponen
                 transcoder.initialize();
                 transcoders.add(transcoder);
             } catch (final Exception e) {
-                log.warn("Unable to locate AttributeTranscoder bean named {}", id, e);
+                log.error("Unable to locate AttributeTranscoder bean named {}", id, e);
             }
         }
         
@@ -338,7 +338,13 @@ public class AttributeTranscoderRegistryImpl extends AbstractServiceableComponen
         final Object baseCondition = ruleset.get(PROP_CONDITION);
         if (baseCondition instanceof Predicate) {
             effectiveCondition = (Predicate) baseCondition;
-        } else if (baseCondition != null) {
+        } else if (baseCondition instanceof String) {
+            try {
+                effectiveCondition = getApplicationContext().getBean((String) baseCondition, Predicate.class);
+            } catch (final Exception e) {
+                log.error("Unable to locate Predicate bean named {}", baseCondition, e);
+            }
+        } else {
             log.error("{} property did not contain a Predicate object, ignored", PROP_CONDITION);
         }
 

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


More information about the commits mailing list