code: public static void throwExceptionIfNeeded(String correlationId, List<ValidationResult> results, boolean strict)
  			throws ValidationException {
  		ValidationException ex = fromResults(correlationId, results, strict);
  		if (ex != null)
  			throw ex;
  	}
docs: Throws ValidationException based on errors in validation results. If
  validation results have no errors, than no exception is thrown.
  
  @param correlationId (optional) transaction id to trace execution through
  call chain.
  @param results       list of validation results that may contain errors
  @param strict        true to treat warnings as errors.
  @throws ValidationException when errors occured in validation.
  
  @see ValidationResult
  @see ValidationException