Skip to content

Commit

Permalink
HV-1148 Using more correct method name
Browse files Browse the repository at this point in the history
  • Loading branch information
gunnarmorling authored and gsmet committed Nov 22, 2016
1 parent 741c4af commit f71fe6b
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -581,7 +581,7 @@ private void validateCascadedConstraints(ValidationContext<?> validationContext,
elementType
) ) {

Object value = getBeanPropertyValue( validationContext, valueContext.getCurrentBean(), cascadable );
Object value = getCascadableValue( validationContext, valueContext.getCurrentBean(), cascadable );

if ( value != null ) {

Expand Down Expand Up @@ -1149,7 +1149,7 @@ private <V> ValueContext<?, V> collectMetaConstraintsForPathWithValue(Validation
throw log.getInvalidPropertyPathException( validationContext.getRootBeanClass(), propertyPath.asString() );
}

value = getBeanPropertyValue( validationContext, value, propertyMetaData );
value = getCascadableValue( validationContext, value, propertyMetaData );
if ( value == null ) {
throw log.getUnableToReachPropertyToValidateException( validationContext.getRootBean(), propertyPath );
}
Expand Down Expand Up @@ -1374,7 +1374,7 @@ private PropertyMetaData getBeanPropertyMetaData(BeanMetaData<?> beanMetaData, P
}

@SuppressWarnings({ "rawtypes", "unchecked" })
private Object getBeanPropertyValue(ValidationContext<?> validationContext, Object object, Cascadable cascadable) {
private Object getCascadableValue(ValidationContext<?> validationContext, Object object, Cascadable cascadable) {
Object value = cascadable.getValue( object );

// Value can be wrapped (e.g. Optional<Address>). Try to unwrap it
Expand Down

0 comments on commit f71fe6b

Please sign in to comment.