[java-identity-provider COMMIT] /trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractValidationAction....
noreply at shibboleth.net
noreply at shibboleth.net
Mon Dec 9 10:32:13 EST 2013
Author: scantor
Date: Mon Dec 9 10:32:13 2013
New Revision: 5005
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=5005&view=rev
Log:
Doc and annotation cleanup.
Modified:
trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractValidationAction.java
Modified: trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractValidationAction.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractValidationAction.java?rev=5005&r1=5004&r2=5005&view=diff
==============================================================================
--- trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractValidationAction.java (original)
+++ trunk/idp-authn-api/src/main/java/net/shibboleth/idp/authn/AbstractValidationAction.java Mon Dec 9 10:32:13 2013
@@ -46,6 +46,7 @@
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
+import com.google.common.base.Strings;
import com.google.common.collect.Collections2;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
@@ -285,16 +286,13 @@
* Adds a message encountered during the action to an {@link AuthenticationErrorContext}, creating one if
* necessary, beneath the {@link AuthenticationContext}, and uses the supplied event as the result of the action.
*
- * <p>The message is matched against the various error message collections to determine whether to also set
- * one of the {@link AuthenticationErrorContext} flags to indicate a more specific error type.</p>
- *
* @param profileRequestContext the current profile request context
* @param authenticationContext the current authentication context
* @param message to process
* @param eventId the event to "return" via an {@link org.opensaml.profile.context.EventContext}
*/
protected void handleError(@Nonnull final ProfileRequestContext profileRequestContext,
- @Nonnull final AuthenticationContext authenticationContext, @Nonnull final String message,
+ @Nonnull final AuthenticationContext authenticationContext, @Nonnull @NotEmpty final String message,
@Nonnull @NotEmpty final String eventId) {
AuthenticationErrorContext errorCtx =
@@ -315,16 +313,13 @@
* Adds a message encountered during the action to an {@link AuthenticationWarningContext}, creating one if
* necessary, beneath the {@link AuthenticationContext}, and uses the supplied event as the result of the action.
*
- * <p>The message is matched against the various warning message collections to determine whether to also set
- * one of the {@link AuthenticationWarningContext} flags to indicate a more specific warning type.</p>
- *
* @param profileRequestContext the current profile request context
* @param authenticationContext the current authentication context
* @param message to process
* @param eventId the event to "return" via an {@link org.opensaml.profile.context.EventContext}
*/
protected void handleWarning(@Nonnull final ProfileRequestContext profileRequestContext,
- @Nonnull final AuthenticationContext authenticationContext, @Nonnull final String message,
+ @Nonnull final AuthenticationContext authenticationContext, @Nonnull @NotEmpty final String message,
@Nonnull @NotEmpty final String eventId) {
AuthenticationWarningContext warningCtx =
@@ -347,14 +342,15 @@
private class MessageChecker implements Predicate<String> {
/** Message to operate on. */
- private String s;
+ @Nonnull @NotEmpty private final String s;
/**
* Constructor.
*
* @param msg to operate on
*/
- public MessageChecker(@Nonnull final String msg) {
+ public MessageChecker(@Nonnull @NotEmpty final String msg) {
+ Constraint.isNotNull(Strings.isNullOrEmpty(msg), "Message cannot be null or empty");
s = msg;
}
More information about the commits
mailing list