You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "michael-o (via GitHub)" <gi...@apache.org> on 2023/02/26 21:02:20 UTC

[GitHub] [maven] michael-o commented on a diff in pull request #1015: Prefer Java standard library to Plexus util

michael-o commented on code in PR #1015:
URL: https://github.com/apache/maven/pull/1015#discussion_r1118151341


##########
maven-artifact/src/test/java/org/apache/maven/artifact/versioning/ComparableVersionTest.java:
##########
@@ -364,4 +364,12 @@ public void testMng7644() {
             checkVersionsEqual("2.0." + x, "2.0.0." + x); // previously ordered, now equals
         }
     }
+
+    @Test
+    public void testMNG7701() {
+        ComparableVersion c1 = new ComparableVersion("1.x");
+        ComparableVersion c2 = new ComparableVersion("1_x");
+
+        assertTrue(c1.compareTo(c2) < 0);
+    }

Review Comment:
   This seems to be wrong here



##########
maven-settings-builder/src/main/java/org/apache/maven/settings/validation/DefaultSettingsValidator.java:
##########
@@ -60,7 +59,7 @@ public void validate(Settings settings, SettingsProblemCollector problems) {
             for (int i = 0; i < pluginGroups.size(); i++) {
                 String pluginGroup = pluginGroups.get(i).trim();
 
-                if (StringUtils.isBlank(pluginGroup)) {
+                if (pluginGroup.trim().isEmpty()) {
                     addViolation(
                             problems, Severity.ERROR, "pluginGroups.pluginGroup[" + i + "]", null, "must not be empty");
                 } else if (!ID_REGEX.matcher(pluginGroup).matches()) {

Review Comment:
   This, the error message is misleading...



##########
maven-settings-builder/src/main/java/org/apache/maven/settings/validation/DefaultSettingsValidator.java:
##########
@@ -60,7 +59,7 @@ public void validate(Settings settings, SettingsProblemCollector problems) {
             for (int i = 0; i < pluginGroups.size(); i++) {
                 String pluginGroup = pluginGroups.get(i).trim();
 
-                if (StringUtils.isBlank(pluginGroup)) {
+                if (pluginGroup.trim().isEmpty()) {

Review Comment:
   This is nonsense now since it is trimmens above in 60. Can it be `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: issues-unsubscribe@maven.apache.org

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