cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/datatype/typeimpl AbstractDatatypeBuilder.java
Date Tue, 02 Mar 2004 06:51:46 GMT
antonio     2004/03/01 22:51:46

  Modified:    src/blocks/woody/java/org/apache/cocoon/woody/datatype/typeimpl
                        AbstractDatatypeBuilder.java
  Log:
  Formatting code
  
  Revision  Changes    Path
  1.10      +4 -3      cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/datatype/typeimpl/AbstractDatatypeBuilder.java
  
  Index: AbstractDatatypeBuilder.java
  ===================================================================
  RCS file: /home/cvs//cocoon-2.1/src/blocks/woody/java/org/apache/cocoon/woody/datatype/typeimpl/AbstractDatatypeBuilder.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- AbstractDatatypeBuilder.java	11 Feb 2004 09:53:44 -0000	1.9
  +++ AbstractDatatypeBuilder.java	2 Mar 2004 06:51:46 -0000	1.10
  @@ -129,10 +129,11 @@
               Element[] validationElements = DomHelper.getChildElements(validationElement,
Constants.WD_NS);
               for (int i = 0; i < validationElements.length; i++) {
                   ValidationRule rule = datatypeManager.createValidationRule(validationElements[i]);
  -                if (!rule.supportsType(datatype.getTypeClass(), datatype.isArrayType()))
{
  +                if (rule.supportsType(datatype.getTypeClass(), datatype.isArrayType()))
{
  +                    datatype.addValidationRule(rule);
  +                } else {
                       throw new Exception("Validation rule \"" + validationElements[i].getLocalName()
+ "\" cannot be used with strings, error at " + DomHelper.getLocation(validationElements[i]));
                   }
  -                datatype.addValidationRule(rule);
               }
           }
       }
  
  
  

Mime
View raw message