[java-shib-attribute] branch main updated: IDP-2038 - AttributeContext unfiltered setter is checking wrong variable

Scott Cantor cantor.2 at osu.edu
Mon Nov 14 18:08:16 UTC 2022


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

scantor pushed a commit to branch main
in repository java-shib-attribute.

View the commit online:
http://git.shibboleth.net/view/?p=java-shib-attribute.git;a=commit;h=87641c77d7d7f071a8a1cb402c2009b519122bf0

The following commit(s) were added to refs/heads/main by this push:
     new 87641c77d IDP-2038 - AttributeContext unfiltered setter is checking wrong variable
87641c77d is described below

commit 87641c77d7d7f071a8a1cb402c2009b519122bf0
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Nov 14 13:08:13 2022 -0500

    IDP-2038 - AttributeContext unfiltered setter is checking wrong variable
    
    https://shibboleth.atlassian.net/browse/IDP-2038
---
 .../java/net/shibboleth/idp/attribute/context/AttributeContext.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/shib-attribute-api/src/main/java/net/shibboleth/idp/attribute/context/AttributeContext.java b/shib-attribute-api/src/main/java/net/shibboleth/idp/attribute/context/AttributeContext.java
index 48ea7898c..70b523860 100644
--- a/shib-attribute-api/src/main/java/net/shibboleth/idp/attribute/context/AttributeContext.java
+++ b/shib-attribute-api/src/main/java/net/shibboleth/idp/attribute/context/AttributeContext.java
@@ -42,10 +42,10 @@ import net.shibboleth.shared.collection.CollectionSupport;
 public final class AttributeContext extends BaseContext {
 
     /** The attributes tracked by this context. */
-    @Nonnull private Map<String,IdPAttribute> attributes;
+    @Nonnull @NonnullElements private Map<String,IdPAttribute> attributes;
     
     /** The attributes tracked by this context prior to filtering. */
-    @Nullable private Map<String,IdPAttribute> unfilteredAttributes;
+    @Nonnull @NonnullElements private Map<String,IdPAttribute> unfilteredAttributes;
     
     /** Whether attribute release consent was obtained from the subject. */
     private boolean consented;
@@ -107,7 +107,7 @@ public final class AttributeContext extends BaseContext {
      */
     @Nonnull public AttributeContext setUnfilteredIdPAttributes(
             @Nullable @NonnullElements final Collection<IdPAttribute> newAttributes) {
-        if (null != unfilteredAttributes) {
+        if (null != newAttributes) {
             unfilteredAttributes = newAttributes.
                     stream().
                     collect(Collectors.toUnmodifiableMap(IdPAttribute::getId,

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


More information about the commits mailing list