Skip to content

Commit

Permalink
HV-678 Some clean-up
Browse files Browse the repository at this point in the history
  • Loading branch information
gunnarmorling committed Mar 19, 2013
1 parent ef475ea commit 7caf677
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
Expand Up @@ -332,7 +332,7 @@ else if ( executableReturnValue != null ) {
}
}

public boolean hasMetaConstraintBeProcessed(Object bean, Path path, MetaConstraint<?> metaConstraint) {
public boolean hasMetaConstraintBeenProcessed(Object bean, Path path, MetaConstraint<?> metaConstraint) {
// TODO switch to proper multi key map (HF)
IdentitySet processedConstraints = processedMetaConstraints.get( new BeanAndPath( bean, path ) );
return processedConstraints != null && processedConstraints.contains( metaConstraint );
Expand Down
Expand Up @@ -996,7 +996,7 @@ private <T> int validateParametersForGroup(ValidationContext<T> validationContex

if ( value != null ) {
Class<?> valueType = value.getClass();
if ( parameterMetaData.getType() instanceof Class && ( (Class) parameterMetaData.getType() ).isPrimitive() ) {
if ( parameterMetaData.getType() instanceof Class && ( (Class<?>) parameterMetaData.getType() ).isPrimitive() ) {
valueType = ReflectionHelper.unBoxedType( valueType );
}
if ( !TypeHelper.isAssignable( parameterMetaData.getType(), valueType ) ) {
Expand Down Expand Up @@ -1278,7 +1278,7 @@ private TraversableResolver getCachingTraversableResolver() {
private boolean isValidationRequired(ValidationContext<?> validationContext,
ValueContext<?, ?> valueContext,
MetaConstraint<?> metaConstraint) {
if ( validationContext.hasMetaConstraintBeProcessed(
if ( validationContext.hasMetaConstraintBeenProcessed(
valueContext.getCurrentBean(),
valueContext.getPropertyPath(),
metaConstraint
Expand Down
@@ -1,6 +1,6 @@
/*
* JBoss, Home of Professional Open Source
* Copyright 2009, Red Hat, Inc. and/or its affiliates, and individual contributors
* Copyright 2013, Red Hat, Inc. and/or its affiliates, and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
Expand Down Expand Up @@ -44,15 +44,13 @@

/**
* @author Hardy Ferentschik
* @author Kevin Pollet <kevin.pollet@serli.com> (C) 2011 SERLI
*/
public class GroupValidationTest {
private Validator validator;

@BeforeMethod
public void setUp() {
validator = getValidator();

}

@Test
Expand Down Expand Up @@ -89,7 +87,7 @@ public interface Second {

public class FailOnSecondValidationCallValidator
implements ConstraintValidator<FailOnSecondValidationCall, Object> {
private AtomicInteger invocationCount = new AtomicInteger( 0 );
private final AtomicInteger invocationCount = new AtomicInteger( 0 );

@Override
public void initialize(FailOnSecondValidationCall parameters) {
Expand Down

0 comments on commit 7caf677

Please sign in to comment.