[java-identity-provider] branch main updated: IDP-1817 Move extraction of display information from Attribute Resolution to point of use

Rod Widdowson rdw at steadingsoftware.com
Thu Jan 20 20:14:11 UTC 2022


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=d8df067641884a29473fcda5b33ab93955556c4a

The following commit(s) were added to refs/heads/main by this push:
     new d8df06764 IDP-1817 Move extraction of display information from Attribute Resolution to point of use
d8df06764 is described below

commit d8df067641884a29473fcda5b33ab93955556c4a
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Thu Jan 20 20:13:13 2022 +0000

    IDP-1817 Move extraction of display information from Attribute Resolution to point of use
    
    https://shibboleth.atlassian.net/browse/IDP-1817
    
    Stop IdPAttribute.clone() from using deprecated methods.
---
 .../src/main/java/net/shibboleth/idp/attribute/IdPAttribute.java  | 8 +++++---
 1 file changed, 5 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 66b077dda..db90a4b99 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
@@ -215,7 +215,9 @@ 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);
+        if (!newDescriptions.isEmpty()) {
+            DeprecationSupport.warnOnce(ObjectType.METHOD, "setDisplayDescriptions", null, null);
+        }
         displayDescriptions = checkedNamesFrom(
                 Constraint.isNotNull(newDescriptions, "Display Descriptions should not be null"));
     }
@@ -263,8 +265,8 @@ public class IdPAttribute implements Comparable<IdPAttribute>, Cloneable {
     @Override
     @Nonnull public IdPAttribute clone() throws CloneNotSupportedException {
         final IdPAttribute clone = (IdPAttribute) super.clone();
-        clone.setDisplayDescriptions(getDisplayDescriptions());
-        clone.setDisplayNames(getDisplayNames());
+        clone.displayDescriptions = checkedNamesFrom(this.displayDescriptions);
+        clone.displayNames = checkedNamesFrom(this.displayNames);
         clone.setValues(getValues());
         return clone;
     }

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


More information about the commits mailing list