[java-identity-provider COMMIT] in /trunk/idp-consent/src/main/java/net/shibboleth/idp/consent/flow/storage: CreateRe...
noreply at shibboleth.net
noreply at shibboleth.net
Wed Nov 19 21:51:08 EST 2014
Author: scantor
Date: Wed Nov 19 21:51:07 2014
New Revision: 6954
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=6954&view=rev
Log:
Mask some I/O errors that shouldn't abort the flow (optionally in one case)
Modified:
trunk/idp-consent/src/main/java/net/shibboleth/idp/consent/flow/storage/CreateResult.java
trunk/idp-consent/src/main/java/net/shibboleth/idp/consent/flow/storage/ReadConsentFromStorage.java
trunk/idp-consent/src/main/java/net/shibboleth/idp/consent/flow/storage/RevokeConsent.java
trunk/idp-consent/src/main/java/net/shibboleth/idp/consent/flow/storage/UpdateStorageIndex.java
Modified: trunk/idp-consent/src/main/java/net/shibboleth/idp/consent/flow/storage/CreateResult.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-consent/src/main/java/net/shibboleth/idp/consent/flow/storage/CreateResult.java?rev=6954&r1=6953&r2=6954&view=diff
==============================================================================
--- trunk/idp-consent/src/main/java/net/shibboleth/idp/consent/flow/storage/CreateResult.java (original)
+++ trunk/idp-consent/src/main/java/net/shibboleth/idp/consent/flow/storage/CreateResult.java Wed Nov 19 21:51:07 2014
@@ -28,8 +28,6 @@
import net.shibboleth.idp.profile.interceptor.ProfileInterceptorResult;
import org.joda.time.DateTime;
-import org.opensaml.profile.action.ActionSupport;
-import org.opensaml.profile.action.EventIds;
import org.opensaml.profile.context.ProfileRequestContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -37,22 +35,13 @@
/**
* Consent action to create a consent result representing the result of a consent flow to be stored in a storage
* service.
+ *
+ * {@link org.opensaml.profile.action.EventIds#PROCEED_EVENT_ID}
*/
public class CreateResult extends AbstractConsentStorageAction {
/** Class logger. */
@Nonnull private final Logger log = LoggerFactory.getLogger(CreateResult.class);
-
- /** {@inheritDoc} */
- @Override protected boolean doPreExecute(@Nonnull final ProfileRequestContext profileRequestContext,
- @Nonnull final ProfileInterceptorContext interceptorContext) {
-
- if (!super.doPreExecute(profileRequestContext, interceptorContext)) {
- return false;
- }
-
- return true;
- }
/** {@inheritDoc} */
@Override protected void doExecute(@Nonnull final ProfileRequestContext profileRequestContext,
@@ -75,9 +64,9 @@
interceptorContext.getResults().add(result);
- } catch (IOException e) {
+ } catch (final IOException e) {
log.debug("{} Unable to serialize consent", getLogPrefix(), e);
- ActionSupport.buildEvent(profileRequestContext, EventIds.IO_ERROR);
}
}
-}
+
+}
Modified: trunk/idp-consent/src/main/java/net/shibboleth/idp/consent/flow/storage/ReadConsentFromStorage.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-consent/src/main/java/net/shibboleth/idp/consent/flow/storage/ReadConsentFromStorage.java?rev=6954&r1=6953&r2=6954&view=diff
==============================================================================
--- trunk/idp-consent/src/main/java/net/shibboleth/idp/consent/flow/storage/ReadConsentFromStorage.java (original)
+++ trunk/idp-consent/src/main/java/net/shibboleth/idp/consent/flow/storage/ReadConsentFromStorage.java Wed Nov 19 21:51:07 2014
@@ -25,8 +25,6 @@
import net.shibboleth.idp.consent.Consent;
import net.shibboleth.idp.profile.context.ProfileInterceptorContext;
-import org.opensaml.profile.action.ActionSupport;
-import org.opensaml.profile.action.EventIds;
import org.opensaml.profile.context.ProfileRequestContext;
import org.opensaml.storage.StorageRecord;
import org.slf4j.Logger;
@@ -34,22 +32,13 @@
/**
* Consent action which reads consents from storage and adds them to the consent context as previous consents.
+ *
+ * @event {@link org.opensaml.profile.action.EventIds#PROCEED_EVENT_ID}
*/
public class ReadConsentFromStorage extends AbstractConsentStorageAction {
/** Class logger. */
@Nonnull private final Logger log = LoggerFactory.getLogger(ReadConsentFromStorage.class);
-
- /** {@inheritDoc} */
- @Override protected boolean doPreExecute(@Nonnull final ProfileRequestContext profileRequestContext,
- @Nonnull final ProfileInterceptorContext interceptorContext) {
-
- if (!super.doPreExecute(profileRequestContext, interceptorContext)) {
- return false;
- }
-
- return true;
- }
/** {@inheritDoc} */
@Override protected void doExecute(@Nonnull final ProfileRequestContext profileRequestContext,
@@ -70,9 +59,9 @@
getConsentContext().getPreviousConsents().putAll(consents);
- } catch (IOException e) {
+ } catch (final IOException e) {
log.error("{} Unable to read consent from storage", getLogPrefix(), e);
- ActionSupport.buildEvent(profileRequestContext, EventIds.IO_ERROR);
}
}
-}
+
+}
[... 127 lines stripped ...]
More information about the commits
mailing list