private static boolean containsError ( final List < Diagnostic > diags ) { if ( diags == null || diags . isEmpty ( ) ) { return false ; } for ( Diagnostic diag : diags ) { if ( diag . getSeverity ( ) == Diagnostic . ERROR ) { return true ; } } return false ; }
Indicates whether the given list of diagnostics contains any errors .