You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by dw...@apache.org on 2009/12/11 20:58:14 UTC

svn commit: r889791 - in /geronimo/specs/trunk/geronimo-validation_1.0_spec: NOTICE pom.xml src/main/appended-resources/ src/main/java/javax/validation/Validation.java

Author: dwoods
Date: Fri Dec 11 19:58:14 2009
New Revision: 889791

URL: http://svn.apache.org/viewvc?rev=889791&view=rev
Log:
remove early access notice.  update WeakHashMap usage in Validation.java.

Removed:
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/appended-resources/
Modified:
    geronimo/specs/trunk/geronimo-validation_1.0_spec/NOTICE
    geronimo/specs/trunk/geronimo-validation_1.0_spec/pom.xml
    geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Validation.java

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/NOTICE
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/NOTICE?rev=889791&r1=889790&r2=889791&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/NOTICE (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/NOTICE Fri Dec 11 19:58:14 2009
@@ -5,5 +5,3 @@
 This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).
 
-This is an implementation of an early-draft specification developed under the Java Community Process (JCP). The code is untested and presumed not to be a compatible implementation of the JSR-303 Bean Validation specification.  We encourage you to migrate to an implementation of the JSR-303 Bean Validation specification that has been tested and verified to be compatible as soon as such an implementation is available, and we encourage you to retain this notice in any implementation of JSR-303 Bean Validation specification that you distribute.
-

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/pom.xml?rev=889791&r1=889790&r2=889791&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/pom.xml (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/pom.xml Fri Dec 11 19:58:14 2009
@@ -32,7 +32,7 @@
 
     <groupId>org.apache.geronimo.specs</groupId>
     <artifactId>geronimo-validation_1.0_spec</artifactId>
-    <version>1.0-EA6-SNAPSHOT</version>
+    <version>1.0-SNAPSHOT</version>
     <packaging>bundle</packaging>
     <name>Apache Geronimo JSR-303 Bean Validation Spec API</name>
     <description>Apache Geronimo implementation of the JSR-303 Bean Validation Spec API</description>
@@ -73,6 +73,9 @@
                 <artifactId>maven-bundle-plugin</artifactId>
                 <configuration>
                     <instructions>
+                        <Specification-Title>JSR-303 Bean Validation API</Specification-Title>
+                        <Specification-Vendor>Sun Microsystems, Inc.</Specification-Vendor>
+                        <Specification-Version>1.0</Specification-Version>
                         <Export-Package>javax.validation*;version=1.0</Export-Package>
                     </instructions>
                 </configuration>

Modified: geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Validation.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Validation.java?rev=889791&r1=889790&r2=889791&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Validation.java (original)
+++ geronimo/specs/trunk/geronimo-validation_1.0_spec/src/main/java/javax/validation/Validation.java Fri Dec 11 19:58:14 2009
@@ -185,7 +185,7 @@
             ValidationProvider.class.getName();
 
         // cache of providers per class loader
-        private static final Map<ClassLoader, List<ValidationProvider<?>>> providerCache =
+        private volatile WeakHashMap<ClassLoader, List<ValidationProvider<?>>> providerCache =
             new WeakHashMap<ClassLoader, List<ValidationProvider<?>>>();
         
         /*
@@ -202,9 +202,7 @@
                 cl = PrivClassLoader.get(DefaultValidationProviderResolver.class);
 
             // use any previously cached providers
-            synchronized (providerCache) {
-                providers = providerCache.get(cl);
-            }
+            providers = providerCache.get(cl);
             if (providers == null) {
                 // need to discover and load them for this class loader
                 providers = new ArrayList<ValidationProvider<?>>();
@@ -255,9 +253,7 @@
                 }
                 
                 // cache the discovered providers
-                synchronized (providerCache) {
-                    providerCache.put(cl, providers);
-                }
+                providerCache.put(cl, providers);
             }
             
             // caller must handle the case of no providers found