You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by mr...@apache.org on 2009/01/18 06:53:33 UTC

svn commit: r735389 - /xerces/java/trunk/src/org/apache/xerces/jaxp/datatype/XMLGregorianCalendarImpl.java

Author: mrglavas
Date: Sat Jan 17 21:53:33 2009
New Revision: 735389

URL: http://svn.apache.org/viewvc?rev=735389&view=rev
Log:
Fixing a bug. '24' is a valid value for the hour field, provided that
the minute and second fields are '0'. Both the XML Schema specification
and JAXP allows this.

Modified:
    xerces/java/trunk/src/org/apache/xerces/jaxp/datatype/XMLGregorianCalendarImpl.java

Modified: xerces/java/trunk/src/org/apache/xerces/jaxp/datatype/XMLGregorianCalendarImpl.java
URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/jaxp/datatype/XMLGregorianCalendarImpl.java?rev=735389&r1=735388&r2=735389&view=diff
==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/jaxp/datatype/XMLGregorianCalendarImpl.java (original)
+++ xerces/java/trunk/src/org/apache/xerces/jaxp/datatype/XMLGregorianCalendarImpl.java Sat Jan 17 21:53:33 2009
@@ -315,7 +315,7 @@
         // only constraint on integer value of year.
         DatatypeConstants.DECEMBER,              
         31,       //day of month                         
-        23,       //hour
+        24,       //hour
         59,       //minute
         60,       //second (leap second allows for 60)
         999,      //millisecond
@@ -2058,7 +2058,8 @@
         }
 
         // http://www.w3.org/2001/05/xmlschema-errata#e2-45
-        if (hour == 24 && (minute != 0 || second != 0)) {
+        if (hour == 24 && (minute != 0 || second != 0 || 
+                (fractionalSecond != null && fractionalSecond.compareTo(DECIMAL_ZERO) != 0))) {
             return false;
         }
 



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