diff --git a/src/main/java/org/apache/maven/plugins/invoker/AbstractInvokerMojo.java b/src/main/java/org/apache/maven/plugins/invoker/AbstractInvokerMojo.java index be59fed8..b297a2c4 100644 --- a/src/main/java/org/apache/maven/plugins/invoker/AbstractInvokerMojo.java +++ b/src/main/java/org/apache/maven/plugins/invoker/AbstractInvokerMojo.java @@ -754,7 +754,7 @@ public void execute() throws MojoExecutionException, MojoFailureException { return; } - if (StringUtils.isEmpty(encoding)) { + if (encoding == null || encoding.isEmpty()) { getLog().warn("File encoding has not been set, using platform encoding " + ReaderFactory.FILE_ENCODING + ", i.e. build is platform dependent!"); } @@ -1477,7 +1477,7 @@ private CharSequence resolveExternalJreVersion() { private File interpolatePomFile(File pomFile, File basedir) throws MojoExecutionException { File interpolatedPomFile = null; if (pomFile != null) { - if (StringUtils.isNotEmpty(filteredPomPrefix)) { + if (filteredPomPrefix != null && !filteredPomPrefix.isEmpty()) { interpolatedPomFile = new File(basedir, filteredPomPrefix + pomFile.getName()); buildInterpolatedFile(pomFile, interpolatedPomFile); } else { @@ -1640,7 +1640,7 @@ private MessageBuilder pad(BuildJob buildJob) { * @param interpolatedPomFile The interpolated pom file. */ private void deleteInterpolatedPomFile(File interpolatedPomFile) { - if (interpolatedPomFile != null && StringUtils.isNotEmpty(filteredPomPrefix)) { + if (interpolatedPomFile != null && (filteredPomPrefix != null && !filteredPomPrefix.isEmpty())) { interpolatedPomFile.delete(); } } diff --git a/src/main/java/org/apache/maven/plugins/invoker/InvokerReport.java b/src/main/java/org/apache/maven/plugins/invoker/InvokerReport.java index 0e08bbaf..40cc33bd 100644 --- a/src/main/java/org/apache/maven/plugins/invoker/InvokerReport.java +++ b/src/main/java/org/apache/maven/plugins/invoker/InvokerReport.java @@ -28,7 +28,6 @@ import java.util.List; import java.util.Locale; -import org.apache.commons.lang3.StringUtils; import org.apache.maven.doxia.sink.Sink; import org.apache.maven.plugins.annotations.Component; import org.apache.maven.plugins.annotations.Mojo; @@ -260,8 +259,8 @@ private void renderBuildJob(BuildJob buildJob) { private String getBuildJobReportName(BuildJob buildJob) { String buildJobName = buildJob.getName(); String buildJobDescription = buildJob.getDescription(); - boolean emptyJobName = StringUtils.isEmpty(buildJobName); - boolean emptyJobDescription = StringUtils.isEmpty(buildJobDescription); + boolean emptyJobName = buildJobName == null || buildJobName.isEmpty(); + boolean emptyJobDescription = buildJobDescription == null || buildJobDescription.isEmpty(); boolean isReportJobNameComplete = !emptyJobName && !emptyJobDescription; if (isReportJobNameComplete) { return getFormattedName(buildJobName, buildJobDescription);