Skip to content

Commit 83b0343

Browse files
committed
(doc) Simplify CompilationFailureException's shortMessage() method
1 parent fc61c06 commit 83b0343

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/main/java/org/apache/maven/plugin/compiler/CompilationFailureException.java

+2-8
Original file line numberDiff line numberDiff line change
@@ -73,17 +73,11 @@ public static String longMessage( List<CompilerMessage> messages )
7373
*/
7474
public static String shortMessage( List<CompilerMessage> messages )
7575
{
76-
StringBuilder sb = new StringBuilder();
77-
78-
sb.append( "Compilation failure" );
76+
StringBuilder sb = new StringBuilder( "Compilation failure" );
7977

8078
if ( messages.size() == 1 )
8179
{
82-
sb.append( LS );
83-
84-
CompilerMessage compilerError = messages.get( 0 );
85-
86-
sb.append( compilerError ).append( LS );
80+
sb.append( LS ).append( messages.get( 0 ) ).append( LS );
8781
}
8882

8983
return sb.toString();

0 commit comments

Comments
 (0)