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 Sun, 11 Oct 2015 16:54:27 GMT
WW-4536 Checks for patterns in action names to build the same key for actions with patterns


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

Branch: refs/heads/support-2-3
Commit: 30d30e07dee736243b035eb47be4a1c8dae469a2
Parents: 755ad3f
Author: Lukasz Lenart <lukasz.lenart@gmail.com>
Authored: Sun Oct 11 18:54:15 2015 +0200
Committer: Lukasz Lenart <lukasz.lenart@gmail.com>
Committed: Sun Oct 11 18:54:15 2015 +0200

----------------------------------------------------------------------
 .../xwork2/validator/AnnotationActionValidatorManager.java    | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/30d30e07/xwork-core/src/main/java/com/opensymphony/xwork2/validator/AnnotationActionValidatorManager.java
----------------------------------------------------------------------
diff --git a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/AnnotationActionValidatorManager.java
b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/AnnotationActionValidatorManager.java
index 5192e2a..3eceaed 100644
--- a/xwork-core/src/main/java/com/opensymphony/xwork2/validator/AnnotationActionValidatorManager.java
+++ b/xwork-core/src/main/java/com/opensymphony/xwork2/validator/AnnotationActionValidatorManager.java
@@ -28,7 +28,6 @@ import com.opensymphony.xwork2.util.ClassLoaderUtil;
 import com.opensymphony.xwork2.util.ValueStack;
 import com.opensymphony.xwork2.util.logging.Logger;
 import com.opensymphony.xwork2.util.logging.LoggerFactory;
-import com.opensymphony.xwork2.validator.validators.VisitorFieldValidator;
 import org.apache.commons.lang3.StringUtils;
 
 import java.io.IOException;
@@ -253,8 +252,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