vlsi commented on a change in pull request #242: Speed up project discovery
URL: https://github.com/apache/maven/pull/242#discussion_r279498117
 
 

 ##########
 File path: 
maven-model-builder/src/main/java/org/apache/maven/model/validation/DefaultModelValidator.java
 ##########
 @@ -829,14 +825,33 @@ private boolean validateId( String fieldName, 
ModelProblemCollector problems, Se
         }
         else
         {
-            boolean match = ID_REGEX.matcher( id ).matches();
-            if ( !match )
+            if ( !isValidId( id ) )
             {
                 addViolation( problems, severity, version, fieldName, 
sourceHint,
                               "with value '" + id + "' does not match a valid 
id pattern.", tracker );
+                return false;
+            }
+            return true;
+        }
+    }
+
+    private boolean isValidId( String id )
 
 Review comment:
   Should this be `static`? (in order to prevent accidental access to instance 
fields)

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


With regards,
Apache Git Services

Reply via email to