You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by sa...@apache.org on 2003/01/23 21:27:20 UTC

cvs commit: xml-xerces/java/src/org/apache/xerces/impl/xs XSConstraints.java

sandygao    2003/01/23 12:27:20

  Modified:    java/src/org/apache/xerces/impl/xs XSConstraints.java
  Log:
  Fixing an NPE. When applying default element values for elements with
  xsi:type, we only need to validate the string once (as oppose to twice when
  we traverse the element decl with value constraints, for the original lexical
  rep and the canonical one).
  
  Revision  Changes    Path
  1.32      +3 -2      xml-xerces/java/src/org/apache/xerces/impl/xs/XSConstraints.java
  
  Index: XSConstraints.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/XSConstraints.java,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- XSConstraints.java	20 Jan 2003 16:59:21 -0000	1.31
  +++ XSConstraints.java	23 Jan 2003 20:27:19 -0000	1.32
  @@ -299,7 +299,8 @@
               // validate the original lexical rep, and set the actual value
               actualValue = dv.validate(value, context, vinfo);
               // validate the canonical lexical rep
  -            actualValue = dv.validate(vinfo.stringValue(), context, vinfo);
  +            if (vinfo != null)
  +                actualValue = dv.validate(vinfo.stringValue(), context, vinfo);
           } catch (InvalidDatatypeValueException ide) {
               return null;
           }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org