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-jdeprscan-plugin.git


The following commit(s) were added to refs/heads/master by this push:
     new f1699a4  Simplify redundant code
f1699a4 is described below

commit f1699a4d19b643197a6359a5ccc06f48a5d2a883
Author: Sylwester Lachiewicz <[email protected]>
AuthorDate: Tue Nov 17 17:38:27 2026 +0000

    Simplify redundant code
---
 .../org/apache/maven/plugins/jdeprscan/AbstractJDeprScanMojo.java   | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/src/main/java/org/apache/maven/plugins/jdeprscan/AbstractJDeprScanMojo.java 
b/src/main/java/org/apache/maven/plugins/jdeprscan/AbstractJDeprScanMojo.java
index 4e5520a..5bce292 100644
--- 
a/src/main/java/org/apache/maven/plugins/jdeprscan/AbstractJDeprScanMojo.java
+++ 
b/src/main/java/org/apache/maven/plugins/jdeprscan/AbstractJDeprScanMojo.java
@@ -187,9 +187,9 @@ public abstract class AbstractJDeprScanMojo extends 
AbstractMojo {
         try {
             int exitCode = CommandLineUtils.executeCommandLine(cmd, out, err);
 
-            String output = (StringUtils.isEmpty(out.getOutput())
+            String output = StringUtils.isEmpty(out.getOutput())
                     ? null
-                    : '\n' + out.getOutput().trim());
+                    : '\n' + out.getOutput().trim();
 
             if (StringUtils.isNotEmpty(output)) {
                 getLog().info(output);
@@ -236,7 +236,7 @@ public abstract class AbstractJDeprScanMojo extends 
AbstractMojo {
                 List<Toolchain> tcs =
                         toolchainManager.getToolchains(session, "jdk", 
Collections.singletonMap("version", "[9,)"));
 
-                if (tcs != null && tcs.size() > 0) {
+                if (tcs != null && !tcs.isEmpty()) {
                     // pick up latest, jdeps of JDK9 has more options compared 
to JDK8
                     tc = tcs.get(tcs.size() - 1);
                 }

Reply via email to