sebbASF commented on a change in pull request #29:
URL: https://github.com/apache/commons-validator/pull/29#discussion_r463642124



##########
File path: 
src/main/java/org/apache/commons/validator/routines/RegexValidator.java
##########
@@ -131,6 +131,15 @@ public RegexValidator(String[] regexs, boolean 
caseSensitive) {
         }
     }
 
+    /**
+     * Getter method for <code>patterns</code>.
+     *
+     * @return the array of <code>patterns</code> used to validate values.
+     */
+    public Pattern[] getPatterns() {
+        return patterns;

Review comment:
       The method must return a copy of the the patterns otherwise the caller 
can mutate the array.




----------------------------------------------------------------
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:
[email protected]


Reply via email to