Author: hardy.ferentschik
Date: 2009-08-25 10:02:05 -0400 (Tue, 25 Aug 2009)
New Revision: 17410
Modified:
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/ValidatorImpl.java
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/groups/GroupChain.java
validator/trunk/hibernate-validator/src/test/java/org/hibernate/validation/engine/groups/GroupChainTest.java
Log:
Fixed typo in method name and deleted unused methods.
Modified:
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/ValidatorImpl.java
===================================================================
---
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/ValidatorImpl.java 2009-08-25
14:01:12 UTC (rev 17409)
+++
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/ValidatorImpl.java 2009-08-25
14:02:05 UTC (rev 17410)
@@ -201,7 +201,7 @@
BeanMetaData<U> beanMetaData = getBeanMetaData(
localExecutionContext.getCurrentBeanType() );
if ( beanMetaData.defaultGroupSequenceIsRedefined() ) {
- groupChain.assertDefaulGroupSequenceIsExpandable(
beanMetaData.getDefaultGroupSequence() );
+ groupChain.assertDefaultGroupSequenceIsExpandable(
beanMetaData.getDefaultGroupSequence() );
}
// process first single groups. For these we can skip some object traversal, by first
running all validations on the current bean
Modified:
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/groups/GroupChain.java
===================================================================
---
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/groups/GroupChain.java 2009-08-25
14:01:12 UTC (rev 17409)
+++
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/groups/GroupChain.java 2009-08-25
14:02:05 UTC (rev 17410)
@@ -19,11 +19,9 @@
import java.util.ArrayList;
import java.util.HashMap;
-import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import java.util.Set;
import javax.validation.GroupDefinitionException;
import javax.validation.groups.Default;
@@ -53,19 +51,6 @@
return sequenceMap.values().iterator();
}
- public Iterator<Group> getAllGroupsUnordered() {
- Set<Group> allGroups = new HashSet<Group>();
- allGroups.addAll( groupList );
- for ( List<Group> sequenceList : sequenceMap.values() ) {
- allGroups.addAll( sequenceList );
- }
- return allGroups.iterator();
- }
-
- public boolean containsSequence(Class<?> groupSequence) {
- return sequenceMap.containsKey( groupSequence );
- }
-
void insertGroup(Group group) {
if ( !groupList.contains( group ) ) {
groupList.add( group );
@@ -90,7 +75,7 @@
'}';
}
- public void assertDefaulGroupSequenceIsExpandable(List<Class<?>>
defaultGroupSequence) {
+ public void assertDefaultGroupSequenceIsExpandable(List<Class<?>>
defaultGroupSequence) {
for ( Map.Entry<Class<?>, List<Group>> entry : sequenceMap.entrySet()
) {
Class<?> sequence = entry.getKey();
List<Group> groupList = entry.getValue();
Modified:
validator/trunk/hibernate-validator/src/test/java/org/hibernate/validation/engine/groups/GroupChainTest.java
===================================================================
---
validator/trunk/hibernate-validator/src/test/java/org/hibernate/validation/engine/groups/GroupChainTest.java 2009-08-25
14:01:12 UTC (rev 17409)
+++
validator/trunk/hibernate-validator/src/test/java/org/hibernate/validation/engine/groups/GroupChainTest.java 2009-08-25
14:02:05 UTC (rev 17410)
@@ -53,7 +53,7 @@
defaultSequence.add( Default.class );
defaultSequence.add( GroupA.class );
try {
- chain.assertDefaulGroupSequenceIsExpandable( defaultSequence );
+ chain.assertDefaultGroupSequenceIsExpandable( defaultSequence );
fail();
}
catch ( GroupDefinitionException e ) {
@@ -64,7 +64,7 @@
defaultSequence.add( GroupA.class );
defaultSequence.add( Default.class );
try {
- chain.assertDefaulGroupSequenceIsExpandable( defaultSequence );
+ chain.assertDefaultGroupSequenceIsExpandable( defaultSequence );
fail();
}
catch ( GroupDefinitionException e ) {
@@ -75,7 +75,7 @@
defaultSequence.add( Default.class );
defaultSequence.add( GroupC.class );
try {
- chain.assertDefaulGroupSequenceIsExpandable( defaultSequence );
+ chain.assertDefaultGroupSequenceIsExpandable( defaultSequence );
fail();
}
catch ( GroupDefinitionException e ) {
@@ -85,7 +85,7 @@
defaultSequence.clear();
defaultSequence.add( GroupC.class );
defaultSequence.add( Default.class );
- chain.assertDefaulGroupSequenceIsExpandable( defaultSequence );
+ chain.assertDefaultGroupSequenceIsExpandable( defaultSequence );
}
@@ -111,14 +111,14 @@
List<Class<?>> defaultSequence = new ArrayList<Class<?>>();
defaultSequence.add( Default.class );
defaultSequence.add( GroupA.class );
- chain.assertDefaulGroupSequenceIsExpandable( defaultSequence );
+ chain.assertDefaultGroupSequenceIsExpandable( defaultSequence );
defaultSequence.clear();
defaultSequence.add( GroupA.class );
defaultSequence.add( Default.class );
try {
- chain.assertDefaulGroupSequenceIsExpandable( defaultSequence );
+ chain.assertDefaultGroupSequenceIsExpandable( defaultSequence );
fail();
}
catch ( GroupDefinitionException e ) {
@@ -129,7 +129,7 @@
defaultSequence.add( Default.class );
defaultSequence.add( GroupC.class );
try {
- chain.assertDefaulGroupSequenceIsExpandable( defaultSequence );
+ chain.assertDefaultGroupSequenceIsExpandable( defaultSequence );
fail();
}
catch ( GroupDefinitionException e ) {
@@ -140,7 +140,7 @@
defaultSequence.add( GroupC.class );
defaultSequence.add( Default.class );
try {
- chain.assertDefaulGroupSequenceIsExpandable( defaultSequence );
+ chain.assertDefaultGroupSequenceIsExpandable( defaultSequence );
fail();
}
catch ( GroupDefinitionException e ) {