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

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

elharo commented on code in PR #1015:
URL: https://github.com/apache/maven/pull/1015#discussion_r1118159158


##########
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:
   snuck in from another PR. Branch management is hard. :-)  removed



##########
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:
   good point, and no it can't be null here since trim() doesn't return null. Fixed. 



##########
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:
   I'm not sure I see how, but in any case that would be a pre-existing, unrelated issue. Please file a JIRA on this. 



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