JSONResult.setIncludeProperties() constructs incorrect patterns
---------------------------------------------------------------

                 Key: WW-3509
                 URL: https://issues.apache.org/jira/browse/WW-3509
             Project: Struts 2
          Issue Type: Bug
          Components: Plugin - JSON
    Affects Versions: 2.2.1
            Reporter: John Lindal


                         // Add a pattern that does not have the indexed 
property
                         // matching (ie. list\[\d+\] becomes list).
                         if (patternPiece.endsWith("\\]")) {
-                            
this.includeProperties.add(Pattern.compile(patternExpr.substring(0, patternPiece
+                            
this.includeProperties.add(Pattern.compile(patternExpr.substring(0, patternExpr
                                     .lastIndexOf("\\["))));
 
                             if (LOG.isDebugEnabled())
                                 LOG.debug("Adding include property expression: 
 "
-                                        + patternExpr.substring(0, 
patternPiece.lastIndexOf("\\[")));
+                                        + patternExpr.substring(0, 
patternExpr.lastIndexOf("\\[")));
                         }
 
                         
this.includeProperties.add(Pattern.compile(patternExpr));


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to