public static String shortMessage ( List < CompilerError > messages ) { StringBuffer sb = new StringBuffer ( ) ; sb . append ( "Compilation failure" ) ; if ( messages . size ( ) == 1 ) { sb . append ( LS ) ; CompilerError compilerError = ( CompilerError ) messages . get ( 0 ) ; sb . append ( compilerError ) . append ( LS ) ; } return sb . toString ( ) ; }
Short message will have the error message if there s only one useful for errors forking the compiler