JCgH4164838Gh792C124B5 commented on a change in pull request #405:
URL: https://github.com/apache/struts/pull/405#discussion_r414185407



##########
File path: 
core/src/main/java/com/opensymphony/xwork2/config/impl/AbstractMatcher.java
##########
@@ -50,10 +53,23 @@
      * <p> The compiled patterns and their associated target objects </p>
      */
     List<Mapping<E>> compiledPatterns = new ArrayList<>();
-    ;
+
+    /**
+     * This flag controls if passed named params should be appended
+     * to the map in {@link #replaceParameters(Map, Map)}
+     * and will be accessible in {@link 
com.opensymphony.xwork2.config.entities.ResultConfig}.
+     * If set to false, the named parameters won't be appended.
+     *
+     * This behaviour is controlled by {@link 
org.apache.struts2.StrutsConstants#STRUTS_MATCHER_APPEND_NAMED_PARAMETERS}
+     *
+     * @since 2.5.23
+     * See WW-5065
+     */
+    private final boolean appendNamedParameters;
     
-    public AbstractMatcher(PatternMatcher<?> helper) {
+    public AbstractMatcher(PatternMatcher<?> helper, boolean 
appendNamedParameters) {

Review comment:
       Because the original method 
   ```
   public AbstractMatcher(PatternMatcher<?> helper)
   ```
   is public, people may have extended this class, which would then break their 
code unexpectedly with this change.  Maybe it would be a good idea to keep the 
old method signature present with something like:
   ```
   public AbstractMatcher(PatternMatcher<?> helper) {
       this(helper, true);  // Set boolean to whatever default setting is 
decided on
   }
   ```
   That should preserve backward-compatbility.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@struts.apache.org
For additional commands, e-mail: dev-h...@struts.apache.org

Reply via email to