Skip to content

Commit

Permalink
HV-1164 Improving JavaDocs, removing superfluous empty lines
Browse files Browse the repository at this point in the history
  • Loading branch information
gunnarmorling authored and gsmet committed Dec 7, 2016
1 parent fe24031 commit 743c5dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Expand Up @@ -8,17 +8,20 @@

import javax.validation.ConstraintViolation;

import org.hibernate.validator.constraintvalidation.HibernateConstraintValidatorContext;

/**
* A custom {@link ConstraintViolation} which allows to get additional information for a constraint violation.
*
* @since 5.3
*/
public interface HibernateConstraintViolation<T> extends ConstraintViolation<T> {

/**
* @param type The type of payload to retrieve
*
* @return an instance of the specified type set by the user via
* {@link org.hibernate.validator.constraintvalidation.HibernateConstraintValidatorContext#withDynamicPayload(Object)}.
* {@link HibernateConstraintValidatorContext#withDynamicPayload(Object)} or {@code null} if no constraint payload
* if the given type has been set.
*/
<C> C getDynamicPayload(Class<C> type);
}
Expand Up @@ -176,7 +176,6 @@ public void initialize(OracleConstraint constraintAnnotation) {
public boolean isValid(String question, ConstraintValidatorContext context) {
HibernateConstraintValidatorContext hibernateContext = context.unwrap( HibernateConstraintValidatorContext.class );


if ( question.equals( QUESTION_1 ) ) {
createSingleConstraintViolation( hibernateContext );
}
Expand Down Expand Up @@ -219,5 +218,3 @@ private void createSingleConstraintViolation(HibernateConstraintValidatorContext
}
}
}


0 comments on commit 743c5dd

Please sign in to comment.