You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by ku...@apache.org on 2024/11/03 00:21:58 UTC
(struts) branch WW-3714-overriding-behaviour updated (c47ab9fbd -> ed92552e4)
This is an automated email from the ASF dual-hosted git repository.
kusal pushed a change to branch WW-3714-overriding-behaviour
in repository https://gitbox.apache.org/repos/asf/struts.git
discard c47ab9fbd WW-3714 Ensure correct delegation of new Interceptor API
discard 4281b1be5 WW-3714 Ensure correct delegation of new Result API
discard 7f04e181e WW-5459 Deprecate and repackage ActionChainResult
add 42a683773 WW-5459 Deprecate and repackage ActionChainResult
new efa66d5e9 WW-3714 Ensure correct delegation of new Result API
new ed92552e4 WW-3714 Ensure correct delegation of new Interceptor API
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (c47ab9fbd)
\
N -- N -- N refs/heads/WW-3714-overriding-behaviour (ed92552e4)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../xwork2/config/providers/ConfigurationProviderOgnlAllowlistTest.java | 2 ++
1 file changed, 2 insertions(+)
(struts) 02/02: WW-3714 Ensure correct delegation of new Interceptor API
Posted by ku...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
kusal pushed a commit to branch WW-3714-overriding-behaviour
in repository https://gitbox.apache.org/repos/asf/struts.git
commit ed92552e4ebd0e0772a6df6a72cebd0799619d72
Author: Kusal Kithul-Godage <gi...@kusal.io>
AuthorDate: Sun Nov 3 11:20:04 2024 +1100
WW-3714 Ensure correct delegation of new Interceptor API
---
.../main/java/com/opensymphony/xwork2/DefaultActionInvocation.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/core/src/main/java/com/opensymphony/xwork2/DefaultActionInvocation.java b/core/src/main/java/com/opensymphony/xwork2/DefaultActionInvocation.java
index f04b765ae..cb2047f06 100644
--- a/core/src/main/java/com/opensymphony/xwork2/DefaultActionInvocation.java
+++ b/core/src/main/java/com/opensymphony/xwork2/DefaultActionInvocation.java
@@ -257,7 +257,7 @@ public class DefaultActionInvocation implements ActionInvocation {
resultCode = executeConditional((ConditionalInterceptor) interceptor);
} else {
LOG.debug("Executing normal interceptor: {}", interceptorMapping.getName());
- resultCode = interceptor.intercept(this);
+ resultCode = interceptor.intercept((org.apache.struts2.ActionInvocation) this);
}
} else {
resultCode = invokeActionOnly();
@@ -298,9 +298,9 @@ public class DefaultActionInvocation implements ActionInvocation {
}
protected String executeConditional(ConditionalInterceptor conditionalInterceptor) throws Exception {
- if (conditionalInterceptor.shouldIntercept(this)) {
+ if (conditionalInterceptor.shouldIntercept((org.apache.struts2.ActionInvocation) this)) {
LOG.debug("Executing conditional interceptor: {}", conditionalInterceptor.getClass().getSimpleName());
- return conditionalInterceptor.intercept(this);
+ return conditionalInterceptor.intercept((org.apache.struts2.ActionInvocation) this);
} else {
LOG.debug("Interceptor: {} is disabled, skipping to next", conditionalInterceptor.getClass().getSimpleName());
return this.invoke();
(struts) 01/02: WW-3714 Ensure correct delegation of new Result API
Posted by ku...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
kusal pushed a commit to branch WW-3714-overriding-behaviour
in repository https://gitbox.apache.org/repos/asf/struts.git
commit efa66d5e914f32cd3ee513b726f766ee9a3a37f9
Author: Kusal Kithul-Godage <gi...@kusal.io>
AuthorDate: Sun Nov 3 11:17:04 2024 +1100
WW-3714 Ensure correct delegation of new Result API
---
.../com/opensymphony/xwork2/DefaultActionInvocation.java | 2 +-
.../java/org/apache/struts2/dispatcher/Dispatcher.java | 2 +-
.../interceptor/TokenSessionStoreInterceptor.java | 16 ++++++++--------
.../org/apache/struts2/rest/RestActionInvocation.java | 4 ++--
4 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/core/src/main/java/com/opensymphony/xwork2/DefaultActionInvocation.java b/core/src/main/java/com/opensymphony/xwork2/DefaultActionInvocation.java
index db171d191..f04b765ae 100644
--- a/core/src/main/java/com/opensymphony/xwork2/DefaultActionInvocation.java
+++ b/core/src/main/java/com/opensymphony/xwork2/DefaultActionInvocation.java
@@ -378,7 +378,7 @@ public class DefaultActionInvocation implements ActionInvocation {
result = createResult();
if (result != null) {
- result.execute(this);
+ result.execute((org.apache.struts2.ActionInvocation) this);
} else if (resultCode != null && !Action.NONE.equals(resultCode)) {
throw new ConfigurationException("No result defined for action " + getAction().getClass().getName()
+ " and result " + getResultCode(), proxy.getConfig());
diff --git a/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java b/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java
index a1f9094d1..ec5333864 100644
--- a/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java
+++ b/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java
@@ -734,7 +734,7 @@ public class Dispatcher {
// if the ActionMapping says to go straight to a result, do it!
if (mapping.getResult() != null) {
Result result = mapping.getResult();
- result.execute(proxy.getInvocation());
+ result.execute((org.apache.struts2.ActionInvocation) proxy.getInvocation());
} else {
proxy.execute();
}
diff --git a/core/src/main/java/org/apache/struts2/interceptor/TokenSessionStoreInterceptor.java b/core/src/main/java/org/apache/struts2/interceptor/TokenSessionStoreInterceptor.java
index 05e491eeb..2657fb7e6 100644
--- a/core/src/main/java/org/apache/struts2/interceptor/TokenSessionStoreInterceptor.java
+++ b/core/src/main/java/org/apache/struts2/interceptor/TokenSessionStoreInterceptor.java
@@ -116,15 +116,15 @@ public class TokenSessionStoreInterceptor extends TokenInterceptor {
* Handles processing of invalid tokens. If a previously stored invocation is
* available, the method will attempt to return and render its result. Otherwise
* it will return INVALID_TOKEN_CODE.
- *
+ *
* Note: Because a stored (previously completed) invocation's PageContext will be closed,
* this method must replace the stored PageContext with the current invocation's one (or a null).
* See {@link org.apache.struts2.util.InvocationSessionStore#loadInvocation(String key, String token)} for details.
- *
+ *
* @param invocation
- *
+ *
* @return
- * @throws Exception
+ * @throws Exception
*/
@Override
protected String handleInvalidToken(ActionInvocation invocation) throws Exception {
@@ -154,7 +154,7 @@ public class TokenSessionStoreInterceptor extends TokenInterceptor {
Result result = savedInvocation.getResult();
if ((result != null) && (savedInvocation.getProxy().getExecuteResult())) {
- result.execute(savedInvocation);
+ result.execute((org.apache.struts2.ActionInvocation) savedInvocation);
}
// turn off execution of this invocations result
@@ -171,11 +171,11 @@ public class TokenSessionStoreInterceptor extends TokenInterceptor {
* Handles processing of valid tokens. Stores the current invocation for
* later use by {@see #handleValidToken(ActionInvocation)}.
* See {@link org.apache.struts2.util.InvocationSessionStore#storeInvocation(String key, String token, ActionInvocation invocation)} for details.
- *
+ *
* @param invocation
- *
+ *
* @return
- * @throws Exception
+ * @throws Exception
*/
@Override
protected String handleValidToken(ActionInvocation invocation) throws Exception {
diff --git a/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionInvocation.java b/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionInvocation.java
index 076f94d87..6399478e0 100644
--- a/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionInvocation.java
+++ b/plugins/rest/src/main/java/org/apache/struts2/rest/RestActionInvocation.java
@@ -207,7 +207,7 @@ public class RestActionInvocation extends DefaultActionInvocation {
if (this.result instanceof HttpHeaderResult) {
// execute the result to apply headers and status in every representations
- this.result.execute(this);
+ this.result.execute((org.apache.struts2.ActionInvocation) this);
updateStatusFromResult();
}
@@ -219,7 +219,7 @@ public class RestActionInvocation extends DefaultActionInvocation {
// Normal struts execution (html o other struts result)
findResult();
if (result != null) {
- this.result.execute(this);
+ this.result.execute((org.apache.struts2.ActionInvocation) this);
} else {
if (LOG.isDebugEnabled()) {
LOG.debug("No result returned for action {} at {}", getAction().getClass().getName(), proxy.getConfig().getLocation());