struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lukaszlen...@apache.org
Subject [2/2] struts git commit: WW-4536 Checks for patterns in action names to build the same key for actions with patterns
Date Mon, 19 Oct 2015 18:52:03 GMT
WW-4536 Checks for patterns in action names to build the same key for actions with patterns

(cherry picked from commit 30d30e07dee736243b035eb47be4a1c8dae469a2)

# Conflicts:
#	core/src/main/java/com/opensymphony/xwork2/validator/AnnotationActionValidatorManager.java


Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/b79c6959
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/b79c6959
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/b79c6959

Branch: refs/heads/master
Commit: b79c6959a4d5fbfd816e6dce660b095683ad987b
Parents: 5dcbe65
Author: Lukasz Lenart <lukaszlenart@apache.org>
Authored: Mon Oct 19 20:51:48 2015 +0200
Committer: Lukasz Lenart <lukaszlenart@apache.org>
Committed: Mon Oct 19 20:51:48 2015 +0200

----------------------------------------------------------------------
 .../xwork2/validator/AnnotationActionValidatorManager.java     | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/b79c6959/core/src/main/java/com/opensymphony/xwork2/validator/AnnotationActionValidatorManager.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/validator/AnnotationActionValidatorManager.java
b/core/src/main/java/com/opensymphony/xwork2/validator/AnnotationActionValidatorManager.java
index d4b9cc6..641bc43 100644
--- a/core/src/main/java/com/opensymphony/xwork2/validator/AnnotationActionValidatorManager.java
+++ b/core/src/main/java/com/opensymphony/xwork2/validator/AnnotationActionValidatorManager.java
@@ -231,8 +231,12 @@ public class AnnotationActionValidatorManager implements ActionValidatorManager
         // wild card actions to keep the flexibility provided
         // by the original design (such as mapping different contexts
         // to the same action and method if desired)
+
+        // UPDATE:
+        // WW-4536 Using NameVariablePatternMatcher allows defines actions
+        // with patterns enclosed with '{}', it's similar case to WW-3753
         String configName = config.getName();
-        if (configName.contains(ActionConfig.WILDCARD)) {
+        if (configName.contains(ActionConfig.WILDCARD) || (configName.contains("{") &&
configName.contains("}"))) {
             sb.append(configName);
             sb.append("|");
             sb.append(proxy.getMethod());


Mime
View raw message