[java-identity-provider] 13/13: IDP-1811 Expose suppressDisplayInformation as a resolver plugin option 3/3

Rod Widdowson rdw at steadingsoftware.com
Sun Jun 6 11:40:53 UTC 2021


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

rdw pushed a commit to branch main
in repository java-identity-provider.

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

commit 118d66ff341a560293b0747c041e28e09d3fab23
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Sat May 8 14:07:50 2021 +0100

    IDP-1811 Expose suppressDisplayInformation as a resolver plugin option 3/3
    
    https://issues.shibboleth.net/jira/browse/IDP-1811
    
    Tighten up the deprecations and warnings.
---
 .../src/main/java/net/shibboleth/idp/attribute/IdPAttribute.java      | 2 ++
 .../net/shibboleth/idp/attribute/resolver/AbstractResolverPlugin.java | 4 +++-
 .../shibboleth/idp/attribute/resolver/impl/AttributeResolverImpl.java | 3 +++
 .../resolver/spring/impl/AttributeResolverServiceStrategy.java        | 3 +++
 4 files changed, 11 insertions(+), 1 deletion(-)

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 f84172560..66b077dda 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
@@ -191,6 +191,7 @@ public class IdPAttribute implements Comparable<IdPAttribute>, Cloneable {
      */
     @Deprecated(forRemoval = true, since = "4.2")
     public void setDisplayNames(@Nonnull @NonnullElements final Map<Locale, String> newNames) {
+        DeprecationSupport.warnOnce(ObjectType.METHOD, "setDisplayNames", null, null);
         displayNames = checkedNamesFrom(
                 Constraint.isNotNull(newNames, "Display Names should not be null"));
     }
@@ -214,6 +215,7 @@ public class IdPAttribute implements Comparable<IdPAttribute>, Cloneable {
      */
     @Deprecated(forRemoval = true, since = "4.2")
     public void setDisplayDescriptions(@Nonnull @NonnullElements final Map<Locale, String> newDescriptions) {
+        DeprecationSupport.warnOnce(ObjectType.METHOD, "setDisplayDescriptions", null, null);
         displayDescriptions = checkedNamesFrom(
                 Constraint.isNotNull(newDescriptions, "Display Descriptions should not be null"));
     }
diff --git a/idp-attribute-resolver-api/src/main/java/net/shibboleth/idp/attribute/resolver/AbstractResolverPlugin.java b/idp-attribute-resolver-api/src/main/java/net/shibboleth/idp/attribute/resolver/AbstractResolverPlugin.java
index 05e61d4b4..e6e046323 100644
--- a/idp-attribute-resolver-api/src/main/java/net/shibboleth/idp/attribute/resolver/AbstractResolverPlugin.java
+++ b/idp-attribute-resolver-api/src/main/java/net/shibboleth/idp/attribute/resolver/AbstractResolverPlugin.java
@@ -96,9 +96,11 @@ public abstract class AbstractResolverPlugin<ResolvedType> extends AbstractIdent
 
     /**
      * Set whether we suppress addition of Display Information.
-     *
+     * @deprecated Display Information should be consulted at point of use
+
      * @param what true if we suppress the addition.
      */
+    @Deprecated(forRemoval = true, since = "4.2")
     public void setSuppressDisplayInformation(final boolean what) {
         ComponentSupport.ifDestroyedThrowDestroyedComponentException(this);
 
diff --git a/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/impl/AttributeResolverImpl.java b/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/impl/AttributeResolverImpl.java
index 5a41b9bbb..730096602 100644
--- a/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/impl/AttributeResolverImpl.java
+++ b/idp-attribute-resolver-impl/src/main/java/net/shibboleth/idp/attribute/resolver/impl/AttributeResolverImpl.java
@@ -196,9 +196,11 @@ public class AttributeResolverImpl extends AbstractServiceableComponent<Attribut
 
     /**
      * Set whether we suppress addition of Display Information.
+     * @deprecated Display Information should be consulted at point of use
      *
      * @param what true if we suppress the addition.
      */
+    @Deprecated(forRemoval = true, since = "4.2")
     public void setSuppressDisplayInformation(final boolean what) {
         ComponentSupport.ifDestroyedThrowDestroyedComponentException(this);
 
@@ -662,6 +664,7 @@ public class AttributeResolverImpl extends AbstractServiceableComponent<Attribut
     }
 
     /** {@inheritDoc} */
+    @SuppressWarnings("removal")
     @Override protected void doInitialize() throws ComponentInitializationException {
         super.doInitialize();
         
diff --git a/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/impl/AttributeResolverServiceStrategy.java b/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/impl/AttributeResolverServiceStrategy.java
index 24cfdc636..8e6b595f1 100644
--- a/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/impl/AttributeResolverServiceStrategy.java
+++ b/idp-attribute-resolver-spring/src/main/java/net/shibboleth/idp/attribute/resolver/spring/impl/AttributeResolverServiceStrategy.java
@@ -77,14 +77,17 @@ public class AttributeResolverServiceStrategy extends AbstractIdentifiableInitia
 
     /**
      * Set whether we suppress addition of Display Information.
+     * @deprecated Display Information should be consulted at point of use
      *
      * @param what true if we suppress the addition.
      */
+    @Deprecated(forRemoval = true, since = "4.2")
     public void setSuppressDisplayInformation(final boolean what) {
         suppressDisplayInformation = what;
     }
 
     /** {@inheritDoc} */
+    @SuppressWarnings("removal")
     @Nullable public ServiceableComponent<AttributeResolver> apply(@Nullable final ApplicationContext appContext) {
 
         final Collection<AttributeDefinition> definitions =

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


More information about the commits mailing list