[java-identity-provider] branch master updated: A bit of cleanup, and eliminating an API inconsistency.
Scott Cantor
cantor.2 at osu.edu
Wed Feb 5 15:37:31 EST 2020
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch master
in repository java-identity-provider.
View the commit online:
http://git.shibboleth.net/view/?p=java-identity-provider.git;a=commit;h=7df0feb5e2e2bda51c424e770b78d8dbef5dd9ec
The following commit(s) were added to refs/heads/master by this push:
new 7df0feb A bit of cleanup, and eliminating an API inconsistency.
7df0feb is described below
commit 7df0feb5e2e2bda51c424e770b78d8dbef5dd9ec
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed Feb 5 15:37:28 2020 -0500
A bit of cleanup, and eliminating an API inconsistency.
---
.../net/shibboleth/idp/authn/AbstractValidationAction.java | 4 +---
.../idp/authn/MultiFactorAuthenticationTransition.java | 4 ++--
.../idp/authn/context/AuthenticationErrorContext.java | 11 +++++------
.../idp/authn/context/AuthenticationWarningContext.java | 2 --
4 files changed, 8 insertions(+), 13 deletions(-)
diff --git a/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractValidationAction.java b/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractValidationAction.java
index dd09027..b3fce4b 100644
--- a/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractValidationAction.java
+++ b/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractValidationAction.java
@@ -434,9 +434,7 @@ public abstract class AbstractValidationAction extends AbstractAuthenticationAct
@Nonnull final AuthenticationContext authenticationContext, @Nonnull final Exception e,
@Nonnull @NotEmpty final String eventId) {
- final AuthenticationErrorContext errorCtx =
- authenticationContext.getSubcontext(AuthenticationErrorContext.class, true);
- errorCtx.addException(e);
+ authenticationContext.getSubcontext(AuthenticationErrorContext.class, true).getExceptions().add(e);
handleError(profileRequestContext, authenticationContext, e.getMessage(), eventId);
}
diff --git a/idp-authn-api/src/main/java/net/shibboleth/idp/authn/MultiFactorAuthenticationTransition.java b/idp-authn-api/src/main/java/net/shibboleth/idp/authn/MultiFactorAuthenticationTransition.java
index 6e5e78c..3df9e1d 100644
--- a/idp-authn-api/src/main/java/net/shibboleth/idp/authn/MultiFactorAuthenticationTransition.java
+++ b/idp-authn-api/src/main/java/net/shibboleth/idp/authn/MultiFactorAuthenticationTransition.java
@@ -124,7 +124,7 @@ public class MultiFactorAuthenticationTransition {
* @param flowId fully-qualified flow ID to run
*/
public void setNextFlow(@Nullable @NotEmpty final String flowId) {
- setNextFlowStrategyMap(Collections.<String,Object>singletonMap("proceed", flowId));
+ setNextFlowStrategyMap(Collections.singletonMap("proceed", flowId));
}
/**
@@ -138,7 +138,7 @@ public class MultiFactorAuthenticationTransition {
public void setNextFlowStrategy(@Nonnull final Function<ProfileRequestContext,String> strategy) {
Constraint.isNotNull(strategy, "Flow strategy function cannot be null");
- setNextFlowStrategyMap(Collections.<String,Object>singletonMap("proceed", strategy));
+ setNextFlowStrategyMap(Collections.singletonMap("proceed", strategy));
}
}
\ No newline at end of file
diff --git a/idp-authn-api/src/main/java/net/shibboleth/idp/authn/context/AuthenticationErrorContext.java b/idp-authn-api/src/main/java/net/shibboleth/idp/authn/context/AuthenticationErrorContext.java
index d2640c3..97d3c3e 100644
--- a/idp-authn-api/src/main/java/net/shibboleth/idp/authn/context/AuthenticationErrorContext.java
+++ b/idp-authn-api/src/main/java/net/shibboleth/idp/authn/context/AuthenticationErrorContext.java
@@ -27,14 +27,10 @@ import javax.annotation.Nonnull;
import net.shibboleth.utilities.java.support.annotation.constraint.Live;
import net.shibboleth.utilities.java.support.annotation.constraint.NonnullElements;
import net.shibboleth.utilities.java.support.annotation.constraint.NotEmpty;
-import net.shibboleth.utilities.java.support.annotation.constraint.NotLive;
-import net.shibboleth.utilities.java.support.annotation.constraint.Unmodifiable;
import net.shibboleth.utilities.java.support.logic.Constraint;
import org.opensaml.messaging.context.BaseContext;
-import com.google.common.collect.ImmutableList;
-
/**
* A context that holds information about authentication failures.
*
@@ -65,15 +61,18 @@ public final class AuthenticationErrorContext extends BaseContext {
*
* @return immutable list of exceptions
*/
- @Nonnull @NonnullElements @Unmodifiable @NotLive public List<Exception> getExceptions() {
- return ImmutableList.copyOf(exceptions);
+ @Nonnull @NonnullElements @Live public List<Exception> getExceptions() {
+ return exceptions;
}
/**
* Add an exception to the list.
*
* @param e exception to add
+ *
+ * @deprecated
*/
+ @Deprecated(forRemoval=true, since="4.0.0")
public void addException(@Nonnull final Exception e) {
Constraint.isNotNull(e, "Exception cannot be null");
diff --git a/idp-authn-api/src/main/java/net/shibboleth/idp/authn/context/AuthenticationWarningContext.java b/idp-authn-api/src/main/java/net/shibboleth/idp/authn/context/AuthenticationWarningContext.java
index d516910..4b93da2 100644
--- a/idp-authn-api/src/main/java/net/shibboleth/idp/authn/context/AuthenticationWarningContext.java
+++ b/idp-authn-api/src/main/java/net/shibboleth/idp/authn/context/AuthenticationWarningContext.java
@@ -46,8 +46,6 @@ public final class AuthenticationWarningContext extends BaseContext {
/** Constructor. */
public AuthenticationWarningContext() {
- super();
-
classifiedWarnings = new HashSet<>();
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list