[java-opensaml COMMIT] in /trunk/opensaml-profile-api/src: main/java/org/opensaml/profile/action/AbstractProfileActio...
noreply at shibboleth.net
noreply at shibboleth.net
Thu Jul 25 13:16:19 EDT 2013
Author: scantor
Date: Thu Jul 25 13:16:19 2013
New Revision: 3414
URL: http://svn.shibboleth.net/view/java-opensaml?rev=3414&view=rev
Log:
Some event handling cleanup to simplify testing.
Modified:
trunk/opensaml-profile-api/src/main/java/org/opensaml/profile/action/AbstractProfileAction.java
trunk/opensaml-profile-api/src/test/java/org/opensaml/profile/action/ActionTestingSupport.java
Modified: trunk/opensaml-profile-api/src/main/java/org/opensaml/profile/action/AbstractProfileAction.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-profile-api/src/main/java/org/opensaml/profile/action/AbstractProfileAction.java?rev=3414&r1=3413&r2=3414&view=diff
==============================================================================
--- trunk/opensaml-profile-api/src/main/java/org/opensaml/profile/action/AbstractProfileAction.java (original)
+++ trunk/opensaml-profile-api/src/main/java/org/opensaml/profile/action/AbstractProfileAction.java Thu Jul 25 13:16:19 2013
@@ -21,6 +21,7 @@
import org.apache.log4j.Logger;
import org.opensaml.profile.ProfileException;
+import org.opensaml.profile.context.EventContext;
import org.opensaml.profile.context.ProfileRequestContext;
import net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent;
@@ -58,6 +59,9 @@
public void execute(
@Nonnull final ProfileRequestContext<InboundMessageType, OutboundMessageType> profileRequestContext)
throws ProfileException {
+
+ // Clear any existing EventContext that might be hanging around.
+ profileRequestContext.removeSubcontext(EventContext.class);
// The try/catch logic is designed to suppress a checked exception raised by
// the doInvoke step by any unchecked errors in the doPostInvoke method.
Modified: trunk/opensaml-profile-api/src/test/java/org/opensaml/profile/action/ActionTestingSupport.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-profile-api/src/test/java/org/opensaml/profile/action/ActionTestingSupport.java?rev=3414&r1=3413&r2=3414&view=diff
==============================================================================
--- trunk/opensaml-profile-api/src/test/java/org/opensaml/profile/action/ActionTestingSupport.java (original)
+++ trunk/opensaml-profile-api/src/test/java/org/opensaml/profile/action/ActionTestingSupport.java Thu Jul 25 13:16:19 2013
@@ -58,7 +58,8 @@
* @param profileRequestContext the context to check
*/
public static void assertProceedEvent(@Nonnull final ProfileRequestContext profileRequestContext) {
- Assert.assertNull(profileRequestContext.getSubcontext(EventContext.class));
+ EventContext<String> ctx = profileRequestContext.getSubcontext(EventContext.class);
+ Assert.assertTrue(ctx == null || ctx.getEvent().equals(EventIds.PROCEED_EVENT_ID));
}
}
More information about the commits
mailing list