Skip to content

Commit c433909

Browse files
Simplify formatting of prerequisites-requirements error
System aware line end is not needed here
1 parent ec21f4b commit c433909

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

maven-core/src/main/java/org/apache/maven/plugin/internal/DefaultMavenPluginManager.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -296,14 +296,12 @@ public void checkPrerequisites(PluginDescriptor pluginDescriptor) throws PluginI
296296
});
297297
// aggregate all exceptions
298298
if (!prerequisiteExceptions.isEmpty()) {
299-
String ln = System.lineSeparator();
300299
String messages = prerequisiteExceptions.stream()
301300
.map(IllegalStateException::getMessage)
302-
.collect(Collectors.joining(ln + '\t'));
301+
.collect(Collectors.joining("\n\t"));
303302
PluginIncompatibleException pie = new PluginIncompatibleException(
304303
pluginDescriptor.getPlugin(),
305-
ln + "The plugin " + pluginDescriptor.getId() + " has unmet prerequisites: " + ln + '\t'
306-
+ messages);
304+
"\nThe plugin " + pluginDescriptor.getId() + " has unmet prerequisites: \n\t" + messages);
307305
prerequisiteExceptions.forEach(pie::addSuppressed);
308306
throw pie;
309307
}

0 commit comments

Comments
 (0)