gnodet commented on code in PR #1080:
URL: https://github.com/apache/maven/pull/1080#discussion_r1158127500


##########
maven-artifact/src/main/java/org/apache/maven/artifact/ArtifactUtils.java:
##########
@@ -89,10 +88,15 @@ public static String key(String groupId, String artifactId, 
String version) {
     }
 
     private static void notBlank(String str, String message) {
-        int c = str != null && str.length() > 0 ? str.charAt(0) : 0;
-        if ((c < '0' || c > '9') && (c < 'a' || c > 'z')) {
-            Validate.notBlank(str, message);
+        final int strLen = str != null ? str.length() : 0;

Review Comment:
   The point is that the length is used after, so we need it anyway.  I think 
the current version is the optimal one.



-- 
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: issues-unsubscr...@maven.apache.org

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

Reply via email to