joerghoh commented on code in PR #53:
URL: 
https://github.com/apache/sling-org-apache-sling-xss/pull/53#discussion_r1919778226


##########
src/main/java/org/apache/sling/xss/impl/xml/Regexp.java:
##########
@@ -27,12 +27,19 @@ public class Regexp {
     private String name;
     private String value;
 
+    private Pattern pattern;
+
     @JsonCreator
     public Regexp(@JacksonXmlProperty(localName = "name", isAttribute = true) 
String name,
             @JacksonXmlProperty(localName = "value", isAttribute = true) 
String regexp) {
 
         this.name = name;
         this.value = regexp;
+
+        if (regexp != null) {

Review Comment:
   This check is a change in behavior, because now ``getPattern()`` can return 
``null``, which was not possible before.
   (``Pattern.compile()`` is not really descriptive when it comes to the 
handling of a ``null`` regexp string, but I would assume that it throws a 
``PatternSyntaxException``.)
   
   Are we sure that regexp is always non-null?
   



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to