[java-identity-provider] branch main updated: Fix null warnings and align setter nullability.
Scott Cantor
cantor.2 at osu.edu
Fri Feb 3 14:48:00 UTC 2023
This is an automated email from the git hooks/post-receive script.
scantor 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=cecbe6e8d73330d13a0d97ae0b620cfdfb38ba64
The following commit(s) were added to refs/heads/main by this push:
new cecbe6e8d Fix null warnings and align setter nullability.
cecbe6e8d is described below
commit cecbe6e8d73330d13a0d97ae0b620cfdfb38ba64
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Fri Feb 3 09:47:54 2023 -0500
Fix null warnings and align setter nullability.
---
.../config/BrowserSSOProfileConfiguration.java | 24 +++++++++++++---------
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/BrowserSSOProfileConfiguration.java b/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/BrowserSSOProfileConfiguration.java
index d91f3dac3..3f3a11310 100644
--- a/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/BrowserSSOProfileConfiguration.java
+++ b/idp-saml-api/src/main/java/net/shibboleth/idp/saml/saml2/profile/config/BrowserSSOProfileConfiguration.java
@@ -803,7 +803,7 @@ public class BrowserSSOProfileConfiguration extends AbstractSAML2ArtifactAwarePr
final Collection<AuthnContextClassRefPrincipal> methods =
defaultAuthenticationContextsLookupStrategy.apply(profileRequestContext);
if (methods != null) {
- return List.copyOf(methods);
+ return CollectionSupport.copyToList(methods);
}
return CollectionSupport.emptyList();
}
@@ -839,7 +839,7 @@ public class BrowserSSOProfileConfiguration extends AbstractSAML2ArtifactAwarePr
@Nullable final ProfileRequestContext profileRequestContext) {
final Set<String> flows = authenticationFlowsLookupStrategy.apply(profileRequestContext);
if (flows != null) {
- return Set.copyOf(flows);
+ return CollectionSupport.copyToSet(flows);
}
return CollectionSupport.emptySet();
}
@@ -852,7 +852,8 @@ public class BrowserSSOProfileConfiguration extends AbstractSAML2ArtifactAwarePr
public void setAuthenticationFlows(@Nullable @NonnullElements final Collection<String> flows) {
if (flows != null) {
authenticationFlowsLookupStrategy =
- FunctionSupport.constant(Set.copyOf(StringSupport.normalizeStringCollection(flows)));
+ FunctionSupport.constant(
+ CollectionSupport.copyToSet(StringSupport.normalizeStringCollection(flows)));
} else {
authenticationFlowsLookupStrategy = FunctionSupport.constant(null);
}
@@ -875,7 +876,7 @@ public class BrowserSSOProfileConfiguration extends AbstractSAML2ArtifactAwarePr
@Nullable final ProfileRequestContext profileRequestContext) {
final Collection<String> flows = postAuthenticationFlowsLookupStrategy.apply(profileRequestContext);
if (flows != null) {
- return List.copyOf(flows);
+ return CollectionSupport.copyToList(flows);
}
return CollectionSupport.emptyList();
}
@@ -918,7 +919,7 @@ public class BrowserSSOProfileConfiguration extends AbstractSAML2ArtifactAwarePr
final Collection<String> formats = nameIDFormatPrecedenceLookupStrategy.apply(profileRequestContext);
if (formats != null) {
- return List.copyOf(formats);
+ return CollectionSupport.copyToList(formats);
}
return CollectionSupport.emptyList();
}
@@ -928,11 +929,14 @@ public class BrowserSSOProfileConfiguration extends AbstractSAML2ArtifactAwarePr
*
* @param formats name identifier formats to use
*/
- public void setNameIDFormatPrecedence(@Nonnull @NonnullElements final Collection<String> formats) {
- Constraint.isNotNull(formats, "List of formats cannot be null");
-
- nameIDFormatPrecedenceLookupStrategy =
- FunctionSupport.constant(List.copyOf(StringSupport.normalizeStringCollection(formats)));
+ public void setNameIDFormatPrecedence(@Nullable @NonnullElements final Collection<String> formats) {
+ if (formats != null) {
+ nameIDFormatPrecedenceLookupStrategy =
+ FunctionSupport.constant(
+ CollectionSupport.copyToList(StringSupport.normalizeStringCollection(formats)));
+ } else {
+ nameIDFormatPrecedenceLookupStrategy = FunctionSupport.constant(null);
+ }
}
/**
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list