(struts) branch WW-5406-injection-order created (now ad49ea866)

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

kusal pushed a change to branch WW-5406-injection-order
in repository https://gitbox.apache.org/repos/asf/struts.git


  at ad49ea866 WW-5406 Fix injection order issue for excluded patterns

This branch includes the following new commits:

 new ad49ea866 WW-5406 Fix injection order issue for excluded patterns

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-5406 Fix injection order issue for excluded patterns

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

kusal pushed a commit to branch WW-5406-injection-order
in repository https://gitbox.apache.org/repos/asf/struts.git

commit ad49ea866a097396135fb347543ec581bcad4389
Author: Kusal Kithul-Godage 
AuthorDate: Thu Apr 18 22:28:30 2024 +1000

WW-5406 Fix injection order issue for excluded patterns
---
 .../org/apache/struts2/dispatcher/Dispatcher.java  | 23 ++
 1 file changed, 15 insertions(+), 8 deletions(-)

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 af5bb5402..a1f9094d1 100644
--- a/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java
+++ b/core/src/main/java/org/apache/struts2/dispatcher/Dispatcher.java
@@ -167,8 +167,9 @@ public class Dispatcher {
  */
 private Pattern multipartValidationPattern = 
Pattern.compile(MULTIPART_FORM_DATA_REGEX);
 
+private String actionExcludedPatternsStr;
 private String actionExcludedPatternsSeparator = ",";
-private List actionExcludedPatterns = emptyList();
+private List actionExcludedPatterns;
 
 /**
  * Provide list of default configuration files.
@@ -355,18 +356,24 @@ public class Dispatcher {
 
 @Inject(value = StrutsConstants.STRUTS_ACTION_EXCLUDE_PATTERN, required = 
false)
 public void setActionExcludedPatterns(String excludedPatterns) {
-this.actionExcludedPatterns = 
buildExcludedPatternsList(excludedPatterns, actionExcludedPatternsSeparator);
+this.actionExcludedPatternsStr = excludedPatterns;
 }
 
-private static List buildExcludedPatternsList(String patterns, 
String separator) {
-if (patterns == null || patterns.trim().isEmpty()) {
-return emptyList();
+public List getActionExcludedPatterns() {
+if (actionExcludedPatterns == null) {
+initActionExcludedPatterns();
 }
-return 
unmodifiableList(Arrays.stream(patterns.split(separator)).map(String::trim).map(Pattern::compile).collect(toList()));
+return actionExcludedPatterns;
 }
 
-public List getActionExcludedPatterns() {
-return actionExcludedPatterns;
+private void initActionExcludedPatterns() {
+if (actionExcludedPatternsStr == null || 
actionExcludedPatternsStr.trim().isEmpty()) {
+actionExcludedPatterns = emptyList();
+return;
+}
+actionExcludedPatterns = unmodifiableList(
+
Arrays.stream(actionExcludedPatternsStr.split(actionExcludedPatternsSeparator))
+
.map(String::trim).map(Pattern::compile).collect(toList()));
 }
 
 @Inject



(struts) branch WW-5406-injection-order deleted (was ad49ea866)

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

kusal pushed a change to branch WW-5406-injection-order
in repository https://gitbox.apache.org/repos/asf/struts.git


 was ad49ea866 WW-5406 Fix injection order issue for excluded patterns

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



(struts) branch master updated (1562e66a8 -> 431053679)

2024-04-18 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 1562e66a8 Merge pull request #912 from 
atlassian-forks/issue/WW-5408-add-option-to-not-fallback-to-empty-namespace-when-unresolved
 add ad49ea866 WW-5406 Fix injection order issue for excluded patterns
 new 431053679 Merge pull request #917 from apache/WW-5406-injection-order

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:
 .../org/apache/struts2/dispatcher/Dispatcher.java  | 23 ++
 1 file changed, 15 insertions(+), 8 deletions(-)



(struts) 01/01: Merge pull request #917 from apache/WW-5406-injection-order

2024-04-18 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 4310536799429cb206e2e5b6d90b8f1ff8b12b4a
Merge: 1562e66a8 ad49ea866
Author: Kusal Kithul-Godage 
AuthorDate: Fri Apr 19 08:37:14 2024 +1000

Merge pull request #917 from apache/WW-5406-injection-order

 .../org/apache/struts2/dispatcher/Dispatcher.java  | 23 ++
 1 file changed, 15 insertions(+), 8 deletions(-)