(struts) branch WW-4062-ognl-exc-cache created (now 04905ce8a)

2024-08-13 Thread kusal
This is an automated email from the ASF dual-hosted git repository.

kusal pushed a change to branch WW-4062-ognl-exc-cache
in repository https://gitbox.apache.org/repos/asf/struts.git


  at 04905ce8a WW-4062 Further optimisation of OgnlException caching

This branch includes the following new commits:

 new 04905ce8a WW-4062 Further optimisation of OgnlException caching

The 1 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.




(struts) 01/01: WW-4062 Further optimisation of OgnlException caching

2024-08-13 Thread kusal
This is an automated email from the ASF dual-hosted git repository.

kusal pushed a commit to branch WW-4062-ognl-exc-cache
in repository https://gitbox.apache.org/repos/asf/struts.git

commit 04905ce8a22c54e5c1e830a374e0e0435e1d7be0
Author: Kusal Kithul-Godage 
AuthorDate: Tue Aug 13 18:29:04 2024 +1000

WW-4062 Further optimisation of OgnlException caching
---
 core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java | 7 +++
 core/src/test/java/com/opensymphony/xwork2/ognl/OgnlUtilTest.java | 7 ---
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java 
b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java
index 05d0be6c5..b94253478 100644
--- a/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java
+++ b/core/src/main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java
@@ -602,10 +602,9 @@ public class OgnlUtil {
 tree = expressionCache.get(expr);
 }
 if (tree instanceof OgnlException) {
-// OgnlException was cached, rethrow it with updated stack trace
-OgnlException e = (OgnlException) tree;
-e.getCause().fillInStackTrace();
-throw e;
+// OgnlException was cached, rethrow it with empty stack trace 
(refilling the stack trace is expensive)
+((OgnlException) tree).getCause().setStackTrace(new 
StackTraceElement[0]);
+throw (OgnlException) tree;
 }
 if (tree == null) {
 try {
diff --git a/core/src/test/java/com/opensymphony/xwork2/ognl/OgnlUtilTest.java 
b/core/src/test/java/com/opensymphony/xwork2/ognl/OgnlUtilTest.java
index b7ba175f7..40c2dbddf 100644
--- a/core/src/test/java/com/opensymphony/xwork2/ognl/OgnlUtilTest.java
+++ b/core/src/test/java/com/opensymphony/xwork2/ognl/OgnlUtilTest.java
@@ -1650,14 +1650,15 @@ public class OgnlUtilTest extends XWorkTestCase {
 StackTraceElement[] stackTrace = e.getStackTrace();
 assertThat(stackTrace).isEmpty();
 StackTraceElement[] causeStackTrace = e.getCause().getStackTrace();
+assertThat(causeStackTrace).isNotEmpty();
 
 OgnlException e2 = assertThrows(OgnlException.class, () -> 
ognlUtil.compile(".literal.$something"));
-StackTraceElement[] stackTrace2 = e.getStackTrace();
+StackTraceElement[] stackTrace2 = e2.getStackTrace();
 assertThat(stackTrace2).isEmpty();
-StackTraceElement[] causeStackTrace2 = e.getCause().getStackTrace();
+StackTraceElement[] causeStackTrace2 = e2.getCause().getStackTrace();
 
+assertThat(causeStackTrace2).isEmpty(); // Stack trace cleared before 
rethrow
 assertSame(e, e2); // Exception is cached
-assertThat(causeStackTrace).isNotEqualTo(causeStackTrace2); // Stack 
trace refreshed
 }
 
 /**



(struts) branch WW-4062-ognl-exc-cache updated (04905ce8a -> 0fd85517e)

2024-08-13 Thread kusal
This is an automated email from the ASF dual-hosted git repository.

kusal pushed a change to branch WW-4062-ognl-exc-cache
in repository https://gitbox.apache.org/repos/asf/struts.git


omit 04905ce8a WW-4062 Further optimisation of OgnlException caching
 add 0fd85517e WW-4062 Further optimisation of OgnlException caching

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   (04905ce8a)
\
 N -- N -- N   refs/heads/WW-4062-ognl-exc-cache (0fd85517e)

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.

No new revisions were added by this update.

Summary of changes:
 .../main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java| 13 ++---
 1 file changed, 10 insertions(+), 3 deletions(-)



(struts) branch master updated (8d07694be -> 9b259ae43)

2024-08-13 Thread kusal
This is an automated email from the ASF dual-hosted git repository.

kusal pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/struts.git


from 8d07694be Merge pull request #1019 from 
apache/dependabot/maven/org.apache.maven.plugins-maven-failsafe-plugin-3.3.1
 add 0fd85517e WW-4062 Further optimisation of OgnlException caching
 new 9b259ae43 Merge pull request #1021 from apache/WW-4062-ognl-exc-cache

The 1 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:
 .../main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java | 16 +++-
 .../java/com/opensymphony/xwork2/ognl/OgnlUtilTest.java  |  7 ---
 2 files changed, 15 insertions(+), 8 deletions(-)



(struts) 01/01: Merge pull request #1021 from apache/WW-4062-ognl-exc-cache

2024-08-13 Thread kusal
This is an automated email from the ASF dual-hosted git repository.

kusal pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/struts.git

commit 9b259ae43a30cacdc20716f62033fb4361b48877
Merge: 8d07694be 0fd85517e
Author: Kusal Kithul-Godage 
AuthorDate: Tue Aug 13 19:22:28 2024 +1000

Merge pull request #1021 from apache/WW-4062-ognl-exc-cache

WW-4062 Further optimisation of OgnlException caching

 .../main/java/com/opensymphony/xwork2/ognl/OgnlUtil.java | 16 +++-
 .../java/com/opensymphony/xwork2/ognl/OgnlUtilTest.java  |  7 ---
 2 files changed, 15 insertions(+), 8 deletions(-)



(struts) branch WW-4062-ognl-exc-cache deleted (was 0fd85517e)

2024-08-13 Thread kusal
This is an automated email from the ASF dual-hosted git repository.

kusal pushed a change to branch WW-4062-ognl-exc-cache
in repository https://gitbox.apache.org/repos/asf/struts.git


 was 0fd85517e WW-4062 Further optimisation of OgnlException caching

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.