Skip to content

Commit

Permalink
HV-912 Removing unused method parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
hferentschik committed Jul 23, 2014
1 parent 7534b4e commit f97c202
Showing 1 changed file with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,7 @@ private boolean validateConstraint(ValidationContext<?> validationContext,
if ( !propertyPathComplete ) {
valueContext.appendNode( propertyMetaData );
}
setValidatedValueHandlerToValueContextIfPresent( validationContext, valueContext, propertyMetaData );
setValidatedValueHandlerToValueContextIfPresent( valueContext, propertyMetaData );
}
else {
valueContext.appendBeanNode();
Expand Down Expand Up @@ -580,7 +580,7 @@ private void validateCascadedConstraints(ValidationContext<?> validationContext,
// Value can be wrapped (e.g. Optional<Address>). Try to unwrap it
ConstraintMetaData metaData = (ConstraintMetaData) cascadable;
if ( metaData.requiresUnwrapping() ) {
setValidatedValueHandlerToValueContextIfPresent( validationContext, valueContext, metaData );
setValidatedValueHandlerToValueContextIfPresent( valueContext, metaData );
valueContext.setCurrentValidatedValue( value );
value = valueContext.getCurrentValidatedValue();
}
Expand Down Expand Up @@ -1094,7 +1094,7 @@ private <T> int validateParametersForGroup(ValidationContext<T> validationContex
}

valueContext.appendNode( parameterMetaData );
setValidatedValueHandlerToValueContextIfPresent( validationContext, valueContext, parameterMetaData );
setValidatedValueHandlerToValueContextIfPresent( valueContext, parameterMetaData );
valueContext.setCurrentValidatedValue( value );

numberOfViolationsOfCurrentGroup += validateConstraintsForGroup(
Expand Down Expand Up @@ -1250,7 +1250,6 @@ private <T> int validateReturnValueForGroup(ValidationContext<T> validationConte
valueContext.setCurrentValidatedValue( value );
valueContext.appendNode( executableMetaData.getReturnValueMetaData() );
setValidatedValueHandlerToValueContextIfPresent(
validationContext,
valueContext,
executableMetaData.getReturnValueMetaData()
);
Expand Down Expand Up @@ -1487,8 +1486,7 @@ private ValidatedValueUnwrapper<?> getValidatedValueHandler(Type type) {
return null;
}

private <T> void setValidatedValueHandlerToValueContextIfPresent(ValidationContext<?> validationContext,
ValueContext<?, T> valueContext, ConstraintMetaData metaData) {
private <T> void setValidatedValueHandlerToValueContextIfPresent(ValueContext<?, T> valueContext, ConstraintMetaData metaData) {
if ( metaData.requiresUnwrapping() ) {
@SuppressWarnings("unchecked") //we know the handler matches the value type
ValidatedValueUnwrapper<? super T> handler = (ValidatedValueUnwrapper<T>) getValidatedValueHandler(
Expand Down

0 comments on commit f97c202

Please sign in to comment.