commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1066831 - /commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/RulesBinderImpl.java
Date Thu, 03 Feb 2011 15:17:00 GMT
Author: simonetripodi
Date: Thu Feb  3 15:16:58 2011
New Revision: 1066831

URL: http://svn.apache.org/viewvc?rev=1066831&view=rev
Log:
Rule creation errors will be risen directly, without storing the errors

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

Modified: commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/RulesBinderImpl.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/RulesBinderImpl.java?rev=1066831&r1=1066830&r2=1066831&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/RulesBinderImpl.java
(original)
+++ commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/RulesBinderImpl.java
Thu Feb  3 15:16:58 2011
@@ -393,9 +393,8 @@ final class RulesBinderImpl implements R
 
                     public FactoryCreateRule get() { // loading error, the rest are binding
errors
                         if (className == null && attributeName == null &&
creationFactory == null) {
-                            addError("{forPattern(\"%s\").factoryCreate()} at least one between
'className' ar 'attributeName' or 'creationFactory' has to be specified",
+                            throw new DigesterLoadingException("{forPattern(\"%s\").factoryCreate()}
at least one between 'className' ar 'attributeName' or 'creationFactory' has to be specified",
                                     keyPattern);
-                            return null;
                         }
 
                         return setNamespaceAndReturn(
@@ -451,9 +450,8 @@ final class RulesBinderImpl implements R
 
                     public ObjectCreateRule get() {
                         if (this.className == null && this.attributeName == null)
{
-                            addError("{forPattern(\"%s\").createObject()} At least one between
'className' or 'attributeName' has to be specified",
+                            throw new DigesterLoadingException("{forPattern(\"%s\").createObject()}
At least one between 'className' or 'attributeName' has to be specified",
                                     keyPattern);
-                            return null;
                         }
 
                         return setNamespaceAndReturn(new ObjectCreateRule(this.className,
this.attributeName));



Mime
View raw message