Incorrect formatting of gMonth value that has no TimeZone
---------------------------------------------------------

                 Key: XERCESJ-1485
                 URL: https://issues.apache.org/jira/browse/XERCESJ-1485
             Project: Xerces2-J
          Issue Type: Bug
          Components: JAXP (javax.xml.datatype)
    Affects Versions: 2.9.1
            Reporter: Anand


A valid gMonth value with no TimeZone information, is incorrectly formatted by 
toXMLFormat() method in 
org.apache.xerces.jaxp.datatype.XMLGregorianCalendarImpl.java.

{code}
....
 else if (typekind == DatatypeConstants.GMONTH) {
            formatString = "--%M--%z";
        }
... 
{code}

The above snippet of code transforms a gMonth value of say "--11" to "--11--"; 
which is invalid.

This has been discovered during a JAXB 2.x RI usage, the error similar to the 
one reported below:
http://forums.java.net/node/694744

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to