commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1103374 - in /commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3: Digester.java FactoryCreateRule.java
Date Sun, 15 May 2011 13:47:56 GMT
Author: simonetripodi
Date: Sun May 15 13:47:55 2011
New Revision: 1103374

URL: http://svn.apache.org/viewvc?rev=1103374&view=rev
Log:
type safed ObjectCreationFactory so users have restricted opportunities to plug wrong wrong
classes as factories

Modified:
    commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/Digester.java
    commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/FactoryCreateRule.java

Modified: commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/Digester.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/Digester.java?rev=1103374&r1=1103373&r2=1103374&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/Digester.java
(original)
+++ commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/Digester.java
Sun May 15 13:47:55 2011
@@ -2215,7 +2215,7 @@ public class Digester
      * @param attributeName Attribute name which, if present, overrides the value specified
by <code>className</code>
      * @see FactoryCreateRule
      */
-    public void addFactoryCreate( String pattern, Class<?> clazz, String attributeName
)
+    public void addFactoryCreate( String pattern, Class<? extends ObjectCreationFactory<?>>
clazz, String attributeName )
     {
 
         addFactoryCreate( pattern, clazz, attributeName, false );
@@ -2297,7 +2297,8 @@ public class Digester
      *            ignored.
      * @see FactoryCreateRule
      */
-    public void addFactoryCreate( String pattern, Class<?> clazz, String attributeName,
boolean ignoreCreateExceptions )
+    public void addFactoryCreate( String pattern, Class<? extends ObjectCreationFactory<?>>
clazz,
+                                  String attributeName, boolean ignoreCreateExceptions )
     {
 
         addRule( pattern, new FactoryCreateRule( clazz, attributeName, ignoreCreateExceptions
) );

Modified: commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/FactoryCreateRule.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/FactoryCreateRule.java?rev=1103374&r1=1103373&r2=1103374&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/FactoryCreateRule.java
(original)
+++ commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/FactoryCreateRule.java
Sun May 15 13:47:55 2011
@@ -199,7 +199,7 @@ public class FactoryCreateRule
      *            creation factory to create.
      * @param ignoreCreateExceptions if true, exceptions thrown by the object creation factory
will be ignored.
      */
-    public FactoryCreateRule( Class<?> clazz, String attributeName, boolean ignoreCreateExceptions
)
+    public FactoryCreateRule( Class<? extends ObjectCreationFactory<?>> clazz,
String attributeName, boolean ignoreCreateExceptions )
     {
 
         this( clazz.getName(), attributeName, ignoreCreateExceptions );



Mime
View raw message