commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r991892 - in /commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations: ./ internal/
Date Thu, 02 Sep 2010 11:19:21 GMT
Author: simonetripodi
Date: Thu Sep  2 11:19:20 2010
New Revision: 991892

URL: http://svn.apache.org/viewvc?rev=991892&view=rev
Log:
reorganized internal stuff
cache should not be shared between loaders, it is potentially dangerous...

Added:
    commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/internal/DefaultAnnotationRuleProviderFactory.java
      - copied, changed from r991820, commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/DefaultAnnotationRuleProviderFactory.java
    commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/internal/DefaultDigesterLoaderHandlerFactory.java
      - copied, changed from r991820, commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/DefaultDigesterLoaderHandlerFactory.java
Removed:
    commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/DefaultAnnotationRuleProviderFactory.java
    commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/DefaultDigesterLoaderHandlerFactory.java
Modified:
    commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/DigesterLoader.java
    commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/DigesterLoaderBuilder.java
    commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/FromAnnotationRuleProviderFactory.java
    commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/internal/RuleSetCache.java

Modified: commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/DigesterLoader.java
URL: http://svn.apache.org/viewvc/commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/DigesterLoader.java?rev=991892&r1=991891&r2=991892&view=diff
==============================================================================
--- commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/DigesterLoader.java
(original)
+++ commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/DigesterLoader.java
Thu Sep  2 11:19:20 2010
@@ -44,7 +44,7 @@ public final class DigesterLoader {
      * In-memory LRU cache that stores already analyzed classes and relative
      * {@link RuleSet}.
      */
-    private final RuleSetCache cachedRuleSet = RuleSetCache.getInstance();
+    private final RuleSetCache cachedRuleSet = new RuleSetCache();
 
     private final AnnotationRuleProviderFactory annotationRuleProviderFactory;
 

Modified: commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/DigesterLoaderBuilder.java
URL: http://svn.apache.org/viewvc/commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/DigesterLoaderBuilder.java?rev=991892&r1=991891&r2=991892&view=diff
==============================================================================
--- commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/DigesterLoaderBuilder.java
(original)
+++ commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/DigesterLoaderBuilder.java
Thu Sep  2 11:19:20 2010
@@ -16,6 +16,7 @@
  */
 package org.apache.commons.digester.annotations;
 
+import org.apache.commons.digester.annotations.internal.DefaultAnnotationRuleProviderFactory;
 import org.apache.commons.digester.annotations.spi.AnnotationRuleProviderFactory;
 
 /**

Modified: commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/FromAnnotationRuleProviderFactory.java
URL: http://svn.apache.org/viewvc/commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/FromAnnotationRuleProviderFactory.java?rev=991892&r1=991891&r2=991892&view=diff
==============================================================================
--- commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/FromAnnotationRuleProviderFactory.java
(original)
+++ commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/FromAnnotationRuleProviderFactory.java
Thu Sep  2 11:19:20 2010
@@ -16,6 +16,7 @@
  */
 package org.apache.commons.digester.annotations;
 
+import org.apache.commons.digester.annotations.internal.DefaultDigesterLoaderHandlerFactory;
 import org.apache.commons.digester.annotations.spi.AnnotationRuleProviderFactory;
 import org.apache.commons.digester.annotations.spi.DigesterLoaderHandlerFactory;
 

Copied: commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/internal/DefaultAnnotationRuleProviderFactory.java
(from r991820, commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/DefaultAnnotationRuleProviderFactory.java)
URL: http://svn.apache.org/viewvc/commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/internal/DefaultAnnotationRuleProviderFactory.java?p2=commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/internal/DefaultAnnotationRuleProviderFactory.java&p1=commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/DefaultAnnotationRuleProviderFactory.java&r1=991820&r2=991892&rev=991892&view=diff
==============================================================================
--- commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/DefaultAnnotationRuleProviderFactory.java
(original)
+++ commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/internal/DefaultAnnotationRuleProviderFactory.java
Thu Sep  2 11:19:20 2010
@@ -14,21 +14,23 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.digester.annotations;
+package org.apache.commons.digester.annotations.internal;
 
 import java.lang.annotation.Annotation;
 import java.lang.reflect.AnnotatedElement;
 
 import org.apache.commons.digester.Rule;
+import org.apache.commons.digester.annotations.AnnotationRuleProvider;
+import org.apache.commons.digester.annotations.DigesterLoadingException;
 import org.apache.commons.digester.annotations.spi.AnnotationRuleProviderFactory;
 
 /**
- * Default {@link AnnotationRuleProviderFactory} inplementation.
+ * Default {@link AnnotationRuleProviderFactory} implementation.
  *
  * @version $Id$
  * @since 2.1
  */
-final class DefaultAnnotationRuleProviderFactory implements AnnotationRuleProviderFactory
{
+public final class DefaultAnnotationRuleProviderFactory implements AnnotationRuleProviderFactory
{
 
     /**
      * {@inheritDoc}

Copied: commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/internal/DefaultDigesterLoaderHandlerFactory.java
(from r991820, commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/DefaultDigesterLoaderHandlerFactory.java)
URL: http://svn.apache.org/viewvc/commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/internal/DefaultDigesterLoaderHandlerFactory.java?p2=commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/internal/DefaultDigesterLoaderHandlerFactory.java&p1=commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/DefaultDigesterLoaderHandlerFactory.java&r1=991820&r2=991892&rev=991892&view=diff
==============================================================================
--- commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/DefaultDigesterLoaderHandlerFactory.java
(original)
+++ commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/internal/DefaultDigesterLoaderHandlerFactory.java
Thu Sep  2 11:19:20 2010
@@ -14,11 +14,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.commons.digester.annotations;
+package org.apache.commons.digester.annotations.internal;
 
 import java.lang.annotation.Annotation;
 import java.lang.reflect.AnnotatedElement;
 
+import org.apache.commons.digester.annotations.DigesterLoaderHandler;
+import org.apache.commons.digester.annotations.DigesterLoadingException;
 import org.apache.commons.digester.annotations.spi.DigesterLoaderHandlerFactory;
 
 /**
@@ -27,7 +29,7 @@ import org.apache.commons.digester.annot
  * @version $Id$
  * @since 2.1
  */
-final class DefaultDigesterLoaderHandlerFactory implements DigesterLoaderHandlerFactory {
+public final class DefaultDigesterLoaderHandlerFactory implements DigesterLoaderHandlerFactory
{
 
     /**
      * {@inheritDoc}

Modified: commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/internal/RuleSetCache.java
URL: http://svn.apache.org/viewvc/commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/internal/RuleSetCache.java?rev=991892&r1=991891&r2=991892&view=diff
==============================================================================
--- commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/internal/RuleSetCache.java
(original)
+++ commons/proper/digester/trunk/src/main/java/org/apache/commons/digester/annotations/internal/RuleSetCache.java
Thu Sep  2 11:19:20 2010
@@ -36,20 +36,6 @@ public final class RuleSetCache implemen
     private static final long serialVersionUID = 1L;
 
     /**
-     * The static instance reference.
-     */
-    private final static RuleSetCache INSTANCE = new RuleSetCache();
-
-    /**
-     * Returns the static instance reference.
-     *
-     * @return the static instance reference.
-     */
-    public static RuleSetCache getInstance() {
-        return INSTANCE;
-    }
-
-    /**
      * The fixed cache size.
      */
     private final int cacheSize = 255;
@@ -83,13 +69,6 @@ public final class RuleSetCache implemen
     };
 
     /**
-     * This class can't be instantiated.
-     */
-    private RuleSetCache() {
-        // do nothing
-    }
-
-    /**
      * Returns true if this cache contains a mapping for the specified key.
      *
      * @param key key whose presence in this map is to be tested.



Mime
View raw message