[java-shib-profile] branch main updated: JSPROF-13 - Add usable setter for disallowedFeatures

Codeberg noreply at shibboleth.net
Mon Jul 20 13:12:19 UTC 2026


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

codeberg pushed a commit to branch main
in repository java-shib-profile.

View the commit online:
https://codeberg.org/Shibboleth/java-shib-profile/commit/75dd38cfde338a97dcffcab7beb388dba97915a7

The following commit(s) were added to refs/heads/main by this push:
     new 75dd38c  JSPROF-13 - Add usable setter for disallowedFeatures
75dd38c is described below

commit 75dd38cfde338a97dcffcab7beb388dba97915a7
Author: Scott Cantor <scott at restingparrotsoftware.com>
AuthorDate: Fri Jul 17 14:34:10 2026 -0400

    JSPROF-13 - Add usable setter for disallowedFeatures
    
    https://shibboleth.atlassian.net/browse/JSPROF-13
    
    Copied method up from SP version.
---
 .../config/AbstractProfileConfiguration.java        | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/shib-profile-api/src/main/java/net/shibboleth/profile/config/AbstractProfileConfiguration.java b/shib-profile-api/src/main/java/net/shibboleth/profile/config/AbstractProfileConfiguration.java
index 0496698..2318a42 100644
--- a/shib-profile-api/src/main/java/net/shibboleth/profile/config/AbstractProfileConfiguration.java
+++ b/shib-profile-api/src/main/java/net/shibboleth/profile/config/AbstractProfileConfiguration.java
@@ -15,6 +15,7 @@
 package net.shibboleth.profile.config;
 
 import java.util.Objects;
+import java.util.Set;
 import java.util.function.Function;
 
 import javax.annotation.Nonnull;
@@ -98,6 +99,26 @@ public abstract class AbstractProfileConfiguration extends AbstractIdentifiableI
     public void setDisallowedFeatures(final int mask) {
         disallowedFeaturesLookupStrategy = FunctionSupport.constant(mask);
     }
+
+    /**
+     * Sets a bitmask of disallowed features to block using discrete inputs to cover for Spring's
+     * lack of usable wiring for bitmasks.
+     * 
+     * @param flags a set of flags to OR together
+     * 
+     * @since 5.3.0
+     */
+    public void setDisallowedFeatures(@Nullable final Set<Integer> flags) {
+        int mask = 0;
+        
+        if (flags != null) {
+            for (final Integer flag : flags) {
+                mask |= flag;
+            }
+        }
+        
+        setDisallowedFeaturesLookupStrategy(FunctionSupport.constant(mask));
+    }
     
     /**
      * Set a lookup strategy for the bitmask of disallowed features to block. 

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


More information about the commits mailing list