diff --git a/pom.xml b/pom.xml index c673b15aa..0f49a81ff 100644 --- a/pom.xml +++ b/pom.xml @@ -23,7 +23,7 @@ under the License. org.apache.maven.plugins maven-plugins - 47 + 48 diff --git a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java index c00d35a65..f32932185 100644 --- a/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java +++ b/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java @@ -1428,9 +1428,11 @@ private void compile(final JavaCompiler compiler, final Options configuration) t .append(compileScope.projectScope().id()) .append(" classes."); if (executor.listener instanceof DiagnosticLogger diagnostic) { - diagnostic.firstError(failureCause).ifPresent((c) -> message.append(System.lineSeparator()) - .append("The first error is: ") - .append(c)); + diagnostic + .firstError(failureCause) + .ifPresent((c) -> message.append(System.lineSeparator()) + .append("The first error is: ") + .append(c)); } var failure = new CompilationFailureException(message.toString(), failureCause); if (suppressed != null) {