commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r899250 - /commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/DigesterLoader.java
Date Thu, 14 Jan 2010 15:45:32 GMT
Author: simonetripodi
Date: Thu Jan 14 15:45:32 2010
New Revision: 899250

URL: http://svn.apache.org/viewvc?rev=899250&view=rev
Log:
the Digester loader avoids to add erroneously rules for already analyzed classes, so can't
enter in potential infinite loops 

Modified:
    commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/DigesterLoader.java

Modified: commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/DigesterLoader.java
URL: http://svn.apache.org/viewvc/commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/DigesterLoader.java?rev=899250&r1=899249&r2=899250&view=diff
==============================================================================
--- commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/DigesterLoader.java
(original)
+++ commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/DigesterLoader.java
Thu Jan 14 15:45:32 2010
@@ -119,12 +119,14 @@
     public static void addRules(final Class<?> target, FromAnnotationsRuleSet ruleSet)
{
         if (target == Object.class
                 || target.isInterface()
-                || Modifier.isAbstract(target.getModifiers())) {
+                || Modifier.isAbstract(target.getModifiers())
+                || ruleSet.mapsClass(target)) {
             return;
         }
 
         if (CACHED_RULESET.containsKey(target)) {
             ruleSet.addRulesProviderFrom(CACHED_RULESET.get(target));
+            ruleSet.addMappedClass(target);
             return;
         }
 
@@ -148,6 +150,7 @@
             }
         }
 
+        ruleSet.addMappedClass(target);
         addRules(target.getSuperclass(), ruleSet);
     }
 



Mime
View raw message