Source:
<code>private <T> int validateParametersForGroup(MethodValidationContext<T> validationContext, T object, Object[] parameterValues, Group group) { int numberOfViolationsBefore = validationContext.getFailingConstraints().size(); ExecutableElement executable = validationContext.getExecutable(); BeanMetaData<T> beanMetaData = beanMetaDataManager.getBeanMetaData( validationContext.getRootBeanClass() ); ExecutableMetaData executableMetaData = beanMetaData.getMetaDataFor( executable ); <START> if ( executableMetaData == null ) { <END> return 0; } List<Class<?>> groupList; if ( group.isDefaultGroup() ) { groupList = beanMetaData.getDefaultGroupSequence( object ); } else { groupList = Arrays.<Class<?>>asList( group.getDefiningClass() ); } for ( Class<?> currentValidatedGroup : groupList ) { int numberOfViolationsOfCurrentGroup = 0; ValueContext<T, Object> valueContext = getExecutableValueContext( object, validationContext.getRootBeanClass(), executableMetaData, currentValidatedGroup ); valueContext.setCurrentValidatedValue( parameterValues ); numberOfViolationsOfCurrentGroup += validateConstraintsForGroup( validationContext, valueContext, executableMetaData.getCrossParameterConstraints() ); if ( shouldFailFast( validationContext ) ) { return validationContext.getFailingConstraints().size() - numberOfViolationsBefore; } for ( int i = 0; i < parameterValues.length; i++ ) { PathImpl originalPath = valueContext.getPropertyPath(); Object value = parameterValues[i]; valueContext.appendNode( executableMetaData.getParameterMetaData( i ) ); valueContext.setCurrentValidatedValue( value ); numberOfViolationsOfCurrentGroup += validateConstraintsForGroup( validationContext, valueContext, executableMetaData.getParameterMetaData( i ) ); if ( shouldFailFast( validationContext ) ) { return validationContext.getFailingConstraints().size() - numberOfViolationsBefore; } valueContext.setPropertyPath( originalPath ); } if ( numberOfViolationsOfCurrentGroup > 0 ) { break; } } return validationContext.getFailingConstraints().size() - numberOfViolationsBefore; }</code><technical_language>I get this method in this case due previous check in validateParametersInContext()</technical_language>

Target:
private <T> int validateParametersForGroup(MethodValidationContext<T> validationContext, T object, Object[] parameterValues, Group group) { int numberOfViolationsBefore = validationContext.getFailingConstraints().size(); ExecutableElement executable = validationContext.getExecutable(); BeanMetaData<T> beanMetaData = beanMetaDataManager.getBeanMetaData( validationContext.getRootBeanClass() ); ExecutableMetaData executableMetaData = beanMetaData.getMetaDataFor( executable ); List<Class<?>> groupList; if ( group.isDefaultGroup() ) { groupList = beanMetaData.getDefaultGroupSequence( object ); } else { groupList = Arrays.<Class<?>>asList( group.getDefiningClass() ); } for ( Class<?> currentValidatedGroup : groupList ) { int numberOfViolationsOfCurrentGroup = 0; ValueContext<T, Object> valueContext = getExecutableValueContext( object, validationContext.getRootBeanClass(), executableMetaData, currentValidatedGroup ); valueContext.setCurrentValidatedValue( parameterValues ); numberOfViolationsOfCurrentGroup += validateConstraintsForGroup( validationContext, valueContext, executableMetaData.getCrossParameterConstraints() ); if ( shouldFailFast( validationContext ) ) { return validationContext.getFailingConstraints().size() - numberOfViolationsBefore; } for ( int i = 0; i < parameterValues.length; i++ ) { PathImpl originalPath = valueContext.getPropertyPath(); Object value = parameterValues[i]; valueContext.appendNode( executableMetaData.getParameterMetaData( i ) ); valueContext.setCurrentValidatedValue( value ); numberOfViolationsOfCurrentGroup += validateConstraintsForGroup( validationContext, valueContext, executableMetaData.getParameterMetaData( i ) ); if ( shouldFailFast( validationContext ) ) { return validationContext.getFailingConstraints().size() - numberOfViolationsBefore; } valueContext.setPropertyPath( originalPath ); } if ( numberOfViolationsOfCurrentGroup > 0 ) { break; } } return validationContext.getFailingConstraints().size() - numberOfViolationsBefore; }