Merge branch '3.1.x'

Closes gh-38877
This commit is contained in:
Phillip Webb
2023-12-19 22:51:48 -08:00
45 changed files with 69 additions and 71 deletions

View File

@@ -227,7 +227,7 @@ public abstract class AbstractAotMojo extends AbstractDependencyFilterMojo {
}
boolean hasReportedErrors() {
return this.message.length() > 0;
return !this.message.isEmpty();
}
@Override

View File

@@ -342,7 +342,7 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
try {
StringBuilder classpath = new StringBuilder();
for (URL ele : getClassPathUrls()) {
if (classpath.length() > 0) {
if (!classpath.isEmpty()) {
classpath.append(File.pathSeparator);
}
classpath.append(new File(ele.toURI()));

View File

@@ -98,7 +98,7 @@ final class CommandLineBuilder {
static String build(List<URL> classpathElements) {
StringBuilder classpath = new StringBuilder();
for (URL element : classpathElements) {
if (classpath.length() > 0) {
if (!classpath.isEmpty()) {
classpath.append(File.pathSeparator);
}
classpath.append(toFile(element));