[java-opensaml] branch main updated: IDP-2069 - Null Handling Task
Rod Widdowson
rdw at steadingsoftware.com
Mon Apr 10 13:38:02 UTC 2023
This is an automated email from the git hooks/post-receive script.
rdw pushed a commit to branch main
in repository java-opensaml.
View the commit online:
http://git.shibboleth.net/view/?p=java-opensaml.git;a=commit;h=ff471bcd4a17ae865679272c55fee0203c371ad6
The following commit(s) were added to refs/heads/main by this push:
new ff471bcd4 IDP-2069 - Null Handling Task
ff471bcd4 is described below
commit ff471bcd4a17ae865679272c55fee0203c371ad6
Author: Rod Widdowson <rdw at steadingsoftware.com>
AuthorDate: Mon Apr 10 14:37:48 2023 +0100
IDP-2069 - Null Handling Task
https://shibboleth.atlassian.net/browse/IDP-2069
Add a predicate to see if doPreExecute has been called
---
.../opensaml/profile/action/AbstractProfileAction.java | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/opensaml-profile-api/src/main/java/org/opensaml/profile/action/AbstractProfileAction.java b/opensaml-profile-api/src/main/java/org/opensaml/profile/action/AbstractProfileAction.java
index c3a406c7c..51294095f 100644
--- a/opensaml-profile-api/src/main/java/org/opensaml/profile/action/AbstractProfileAction.java
+++ b/opensaml-profile-api/src/main/java/org/opensaml/profile/action/AbstractProfileAction.java
@@ -50,6 +50,9 @@ public abstract class AbstractProfileAction extends AbstractInitializableCompone
/** Current HTTP response, if available. */
@Nullable private NonnullSupplier<HttpServletResponse> httpServletResponseSupplier;
+ /** Has {@link #doPreExecute(ProfileRequestContext)} been called?. Only ever set to true */
+ private boolean preExecuted;
+
/**
* Get the current HTTP request if available.
*
@@ -133,6 +136,7 @@ public abstract class AbstractProfileAction extends AbstractInitializableCompone
// error object using the Java 7 API.
if (doPreExecute(profileRequestContext)) {
+ preExecuted = true;
try {
doExecute(profileRequestContext);
} catch (final Throwable t) {
@@ -240,6 +244,19 @@ public abstract class AbstractProfileAction extends AbstractInitializableCompone
doPostExecute(profileRequestContext);
}
+ /**
+ * Has the {@link #doPreExecute(ProfileRequestContext)} method been entirely called?
+ *
+ * Note the unsynchronized access. The underlying field is only ever set true, so if true is
+ * returned it is correct, if false is returned is is not safe to make any assumptions (even if
+ * there was an call in flight.
+ *
+ * @since 5.0.0
+ */
+ protected boolean isPreExecuteCalled() {
+ return preExecuted;
+ }
+
/**
* Return a prefix for logging messages for this component.
*
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list