Author: hardy.ferentschik
Date: 2009-06-21 04:39:29 -0400 (Sun, 21 Jun 2009)
New Revision: 16843
Modified:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/bootstrap/defaultprovider/BootstrapTest.java
Log:
reorganized methods
Modified:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/bootstrap/defaultprovider/BootstrapTest.java
===================================================================
---
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/bootstrap/defaultprovider/BootstrapTest.java 2009-06-19
11:45:05 UTC (rev 16842)
+++
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/bootstrap/defaultprovider/BootstrapTest.java 2009-06-21
08:39:29 UTC (rev 16843)
@@ -98,27 +98,6 @@
assertTrue( !providers.isEmpty(), "There should be at least one provider" );
}
- private List<ValidationProvider> readBeanValidationServiceFile() {
- ClassLoader classloader = Thread.currentThread().getContextClassLoader();
- if ( classloader == null ) {
- classloader = BootstrapTest.class.getClassLoader();
- }
- List<ValidationProvider> providers = new ArrayList<ValidationProvider>();
- try {
-
- Enumeration<URL> providerDefinitions = classloader.getResources( SERVICES_FILE
);
- while ( providerDefinitions.hasMoreElements() ) {
- URL url = providerDefinitions.nextElement();
- addProviderToList( providers, url );
- }
- }
- catch ( Exception e ) {
- throw new RuntimeException( "Unable to load service file", e );
- }
- return providers;
- }
-
-
@Test
public void testCustomMessageInterpolatorViaConfiguration() {
Configuration<?> configuration = Validation.byDefaultProvider().configure();
@@ -178,6 +157,26 @@
);
}
+ private List<ValidationProvider> readBeanValidationServiceFile() {
+ ClassLoader classloader = Thread.currentThread().getContextClassLoader();
+ if ( classloader == null ) {
+ classloader = BootstrapTest.class.getClassLoader();
+ }
+ List<ValidationProvider> providers = new ArrayList<ValidationProvider>();
+ try {
+
+ Enumeration<URL> providerDefinitions = classloader.getResources( SERVICES_FILE
);
+ while ( providerDefinitions.hasMoreElements() ) {
+ URL url = providerDefinitions.nextElement();
+ addProviderToList( providers, url );
+ }
+ }
+ catch ( Exception e ) {
+ throw new RuntimeException( "Unable to load service file", e );
+ }
+ return providers;
+ }
+
private void assertCustomMessageInterpolatorUsed(Validator validator) {
Person person = new Person();
person.setFirstName( "John" );
Show replies by date