/** * API to add an error to the validation results. * * @param error - holding the description of reason and object to describe * the validation error * @param context - null or the context to provide additional information */ @Override public <T extends ValidationListener> void addError(Error error, ValidationContext<T> context) { if (errorsByReason == null) { initialize(); } addToReasonBucket(error); addToOwnerBucket(error); }