code: 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;
  	}
docs: Indicates whether the given list of diagnostics contains any errors.
  
  @param diags the list into which any validation diagnostics were added.
  @return true if any of the diagnostics in the list are errors, false otherwise.