[java-identity-provider] branch main updated: JSSH-27 Implement an ensureId method to help with nullability annotation
Rod Widdowson
rdw at steadingsoftware.com
Thu May 25 16:18:40 UTC 2023
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=ae8bf665c3ba007afddb77f81433f96d8bca35dd
The following commit(s) were added to refs/heads/main by this push:
new ae8bf665c JSSH-27 Implement an ensureId method to help with nullability annotation
ae8bf665c is described below
commit ae8bf665c3ba007afddb77f81433f96d8bca35dd
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Thu May 25 17:16:21 2023 +0100
JSSH-27 Implement an ensureId method to help with nullability annotation
https://shibboleth.atlassian.net/browse/JSSH-27
Change a few getId to ensureId
---
.../java/net/shibboleth/idp/authn/impl/SelectAuthenticationFlow.java | 5 ++---
.../shibboleth/idp/authn/impl/SelectSubjectCanonicalizationFlow.java | 2 +-
.../main/java/net/shibboleth/idp/authn/impl/ValidateCredentials.java | 2 +-
.../net/shibboleth/idp/session/impl/SelectLogoutPropagationFlow.java | 3 +--
4 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/SelectAuthenticationFlow.java b/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/SelectAuthenticationFlow.java
index 119e90c10..74839b7e0 100644
--- a/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/SelectAuthenticationFlow.java
+++ b/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/SelectAuthenticationFlow.java
@@ -139,7 +139,7 @@ public class SelectAuthenticationFlow extends AbstractAuthenticationAction {
final AuthenticationFlowDescriptor flow = authenticationContext.getAttemptedFlow();
if (flow != null) {
log.info("{} Moving incomplete flow {} to intermediate set", getLogPrefix(), flow.getId());
- authenticationContext.getIntermediateFlows().put(flow.getId(), authenticationContext.getAttemptedFlow());
+ authenticationContext.getIntermediateFlows().put(flow.ensureId(), authenticationContext.getAttemptedFlow());
}
return true;
@@ -368,8 +368,7 @@ public class SelectAuthenticationFlow extends AbstractAuthenticationAction {
@Nonnull final AuthenticationContext authenticationContext,
@Nonnull final AuthenticationFlowDescriptor descriptor) {
- final String id = descriptor.getId();
- assert id != null;
+ final String id = descriptor.ensureId();
log.debug("{} Selecting inactive authentication flow {}", getLogPrefix(), id);
authenticationContext.setAttemptedFlow(descriptor);
ActionSupport.buildEvent(profileRequestContext, id);
diff --git a/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/SelectSubjectCanonicalizationFlow.java b/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/SelectSubjectCanonicalizationFlow.java
index 8d1d9c887..38375ad0e 100644
--- a/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/SelectSubjectCanonicalizationFlow.java
+++ b/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/SelectSubjectCanonicalizationFlow.java
@@ -63,7 +63,7 @@ public class SelectSubjectCanonicalizationFlow extends AbstractSubjectCanonicali
log.info("{} Moving incomplete flow {} to intermediate set, reselecting a different one", getLogPrefix(),
flow.getId());
c14nContext.getIntermediateFlows().put(
- flow.getId(), c14nContext.getAttemptedFlow());
+ flow.ensureId(), c14nContext.getAttemptedFlow());
}
return super.doPreExecute(profileRequestContext, c14nContext);
diff --git a/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ValidateCredentials.java b/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ValidateCredentials.java
index f4a003b47..7a36492c0 100644
--- a/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ValidateCredentials.java
+++ b/idp-authn-impl/src/main/java/net/shibboleth/idp/authn/impl/ValidateCredentials.java
@@ -131,7 +131,7 @@ public class ValidateCredentials extends AbstractAuditingValidationAction implem
@Nonnull @NotEmpty public String getMetricName() {
// only called in execute when we know the field is non-null
assert currentValidator != null;
- final String cvId = currentValidator. getId();
+ final String cvId = currentValidator.getId();
return super.getMetricName() + '.' + cvId;
}
diff --git a/idp-session-impl/src/main/java/net/shibboleth/idp/session/impl/SelectLogoutPropagationFlow.java b/idp-session-impl/src/main/java/net/shibboleth/idp/session/impl/SelectLogoutPropagationFlow.java
index 42dcf239f..fa73fd42c 100644
--- a/idp-session-impl/src/main/java/net/shibboleth/idp/session/impl/SelectLogoutPropagationFlow.java
+++ b/idp-session-impl/src/main/java/net/shibboleth/idp/session/impl/SelectLogoutPropagationFlow.java
@@ -95,8 +95,7 @@ public class SelectLogoutPropagationFlow extends AbstractProfileAction {
ActionSupport.buildEvent(profileRequestContext, AuthnEventIds.NO_POTENTIAL_FLOW);
return;
}
- final String flowId = flow.getId();
- assert flowId != null;
+ final String flowId = flow.ensureId();
log.debug("{} Selecting logout propagation flow {}", getLogPrefix(), flowId);
ActionSupport.buildEvent(profileRequestContext, flowId);
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list