commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r981233 - in /commons/sandbox/at-digester/trunk/src: java/org/apache/commons/digester/annotations/DigesterLoaderBuilder.java test/org/apache/commons/digester/annotations/AbstractAnnotatedPojoTestCase.java
Date Sun, 01 Aug 2010 14:28:01 GMT
Author: simonetripodi
Date: Sun Aug  1 14:28:00 2010
New Revision: 981233

URL: http://svn.apache.org/viewvc?rev=981233&view=rev
Log:
added shortcut method to create a DigesterLoader using default factories

Modified:
    commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/DigesterLoaderBuilder.java
    commons/sandbox/at-digester/trunk/src/test/org/apache/commons/digester/annotations/AbstractAnnotatedPojoTestCase.java

Modified: commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/DigesterLoaderBuilder.java
URL: http://svn.apache.org/viewvc/commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/DigesterLoaderBuilder.java?rev=981233&r1=981232&r2=981233&view=diff
==============================================================================
--- commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/DigesterLoaderBuilder.java
(original)
+++ commons/sandbox/at-digester/trunk/src/java/org/apache/commons/digester/annotations/DigesterLoaderBuilder.java
Sun Aug  1 14:28:00 2010
@@ -26,6 +26,12 @@ import org.apache.commons.digester.annot
  */
 public final class DigesterLoaderBuilder {
 
+    public static DigesterLoader byDefaultFactories() {
+        return new DigesterLoaderBuilder()
+                    .useDefaultAnnotationRuleProviderFactory()
+                    .useDefaultDigesterLoaderHandlerFactory();
+    }
+
     public FromAnnotationRuleProviderFactory useDefaultAnnotationRuleProviderFactory() {
         return this.useAnnotationRuleProviderFactory(new DefaultAnnotationRuleProviderFactory());
     }

Modified: commons/sandbox/at-digester/trunk/src/test/org/apache/commons/digester/annotations/AbstractAnnotatedPojoTestCase.java
URL: http://svn.apache.org/viewvc/commons/sandbox/at-digester/trunk/src/test/org/apache/commons/digester/annotations/AbstractAnnotatedPojoTestCase.java?rev=981233&r1=981232&r2=981233&view=diff
==============================================================================
--- commons/sandbox/at-digester/trunk/src/test/org/apache/commons/digester/annotations/AbstractAnnotatedPojoTestCase.java
(original)
+++ commons/sandbox/at-digester/trunk/src/test/org/apache/commons/digester/annotations/AbstractAnnotatedPojoTestCase.java
Sun Aug  1 14:28:00 2010
@@ -37,9 +37,7 @@ public abstract class AbstractAnnotatedP
      */
     @Override
     protected void setUp() throws Exception {
-        this.digesterLoader = new DigesterLoaderBuilder()
-                                    .useDefaultAnnotationRuleProviderFactory()
-                                    .useDefaultDigesterLoaderHandlerFactory();
+        this.digesterLoader = DigesterLoaderBuilder.byDefaultFactories();
     }
 
     /**



Mime
View raw message