[java-identity-provider] branch master updated: IDP-1472 - Add deprecation warnings to transcoding rules
Scott Cantor
cantor.2 at osu.edu
Tue Dec 17 15:36:47 EST 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=9a1a82a1cfb9ca76a547f5cb9cad425387b2c996
The following commit(s) were added to refs/heads/master by this push:
new 9a1a82a IDP-1472 - Add deprecation warnings to transcoding rules
9a1a82a is described below
commit 9a1a82a1cfb9ca76a547f5cb9cad425387b2c996
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Tue Dec 17 14:36:42 2019 -0600
IDP-1472 - Add deprecation warnings to transcoding rules
https://issues.shibboleth.net/jira/browse/IDP-1472
---
.../src/main/java/net/shibboleth/idp/attribute/IdPAttribute.java | 6 +++---
.../transcoding/impl/AttributeTranscoderRegistryImpl.java | 9 +++++++++
2 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/idp-attribute-api/src/main/java/net/shibboleth/idp/attribute/IdPAttribute.java b/idp-attribute-api/src/main/java/net/shibboleth/idp/attribute/IdPAttribute.java
index 0dde305..4eaaf6a 100644
--- a/idp-attribute-api/src/main/java/net/shibboleth/idp/attribute/IdPAttribute.java
+++ b/idp-attribute-api/src/main/java/net/shibboleth/idp/attribute/IdPAttribute.java
@@ -114,10 +114,10 @@ public class IdPAttribute implements Comparable<IdPAttribute>, Cloneable {
if (isDeprecatedId(id)) {
// Issue a deprecation warning once but log more in debug and trace to help fixing
- DeprecationSupport.warnOnce(ObjectType.BEAN,
+ DeprecationSupport.warnOnce(ObjectType.CONFIGURATION,
"IdPAttribute",
- "Attributes with special characters (\'\"%{})", null);
- LOG.debug("{} - deprecate character in attribute name", id);
+ "IdPAttribute id with special characters (\'\"%{})", null);
+ LOG.debug("{} - deprecated character in attribute name", id);
LOG.trace("Stack", new Exception("Stack Trace, not a thrown exception:"));
}
displayNames = Collections.emptyMap();
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 8b86f23..096d9b0 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
@@ -50,7 +50,9 @@ import net.shibboleth.utilities.java.support.annotation.constraint.NotLive;
import net.shibboleth.utilities.java.support.annotation.constraint.Unmodifiable;
import net.shibboleth.utilities.java.support.component.ComponentSupport;
import net.shibboleth.utilities.java.support.logic.Constraint;
+import net.shibboleth.utilities.java.support.primitive.DeprecationSupport;
import net.shibboleth.utilities.java.support.primitive.StringSupport;
+import net.shibboleth.utilities.java.support.primitive.DeprecationSupport.ObjectType;
/** Service implementation of the {@link AttributeTranscoderRegistry} interface. */
@ThreadSafe
@@ -131,6 +133,13 @@ public class AttributeTranscoderRegistryImpl extends AbstractServiceableComponen
final String internalId = StringSupport.trimOrNull(mapping.get(PROP_ID, String.class));
if (internalId != null && !IdPAttribute.isInvalidId(internalId)) {
+
+ if (IdPAttribute.isDeprecatedId(internalId)) {
+ DeprecationSupport.warn(ObjectType.CONFIGURATION,
+ "TranscodingRule",
+ "TranscodingRule id with special characters (\'\"%{})", null);
+ }
+
final Predicate<?> activationCondition = buildActivationCondition(mapping.getMap());
if (activationCondition != null) {
mapping.getMap().put(PROP_CONDITION, activationCondition);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list