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


##########
maven-core/src/main/java/org/apache/maven/rtinfo/internal/DefaultRuntimeInformation.java:
##########
@@ -102,7 +102,9 @@ public boolean isMavenVersion(String versionRange) {
         Version current;
         try {
             String mavenVersion = getMavenVersion();
-            Validate.validState(StringUtils.isNotEmpty(mavenVersion), "Could 
not determine current Maven version");
+            if (!(mavenVersion != null && !mavenVersion.isEmpty())) {

Review Comment:
   `getMavenVersion` is guaranteed to return a non null string (though it could 
be empty), so simplifying to `if (mavenVersion.isEmpty()) {`  looks a good idea.



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