This is an automated email from the ASF dual-hosted git repository. slachiewicz pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/maven-help-plugin.git
commit 32cec32b68f5f06fcc5ea6b1f167022c6ab2a2d9 Author: Sylwester Lachiewicz <[email protected]> AuthorDate: Tue Nov 17 06:17:50 2026 +0000 Simplify redundant code --- src/main/java/org/apache/maven/plugins/help/AbstractEffectiveMojo.java | 3 +-- src/main/java/org/apache/maven/plugins/help/EffectivePomMojo.java | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/apache/maven/plugins/help/AbstractEffectiveMojo.java b/src/main/java/org/apache/maven/plugins/help/AbstractEffectiveMojo.java index 16a4589..ef326dc 100644 --- a/src/main/java/org/apache/maven/plugins/help/AbstractEffectiveMojo.java +++ b/src/main/java/org/apache/maven/plugins/help/AbstractEffectiveMojo.java @@ -27,7 +27,6 @@ import java.io.StringWriter; import java.io.Writer; import java.nio.file.Files; import java.util.ArrayList; -import java.util.Collections; import java.util.LinkedHashSet; import java.util.List; import java.util.Properties; @@ -163,7 +162,7 @@ public abstract class AbstractEffectiveMojo extends AbstractHelpMojo { public Set<Object> keySet() { Set<Object> keynames = super.keySet(); List list = new ArrayList(keynames); - Collections.sort(list); + list.sort(null); return new LinkedHashSet<>(list); } diff --git a/src/main/java/org/apache/maven/plugins/help/EffectivePomMojo.java b/src/main/java/org/apache/maven/plugins/help/EffectivePomMojo.java index 6a1738d..93813c7 100644 --- a/src/main/java/org/apache/maven/plugins/help/EffectivePomMojo.java +++ b/src/main/java/org/apache/maven/plugins/help/EffectivePomMojo.java @@ -236,7 +236,7 @@ public class EffectivePomMojo extends AbstractEffectiveMojo { s = source.toString(); } - return '}' + s + ((location.getLineNumber() >= 0) ? ", line " + location.getLineNumber() : "") + ' '; + return '}' + s + (location.getLineNumber() >= 0 ? ", line " + location.getLineNumber() : "") + ' '; } } }
