You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "George F. Willard III (JIRA)" <xe...@xml.apache.org> on 2005/09/05 16:34:30 UTC

[jira] Created: (XERCESJ-1097) XMLGregorianCalendarImpl format method generates improperly formatted date string

XMLGregorianCalendarImpl format method generates improperly formatted date string
---------------------------------------------------------------------------------

         Key: XERCESJ-1097
         URL: http://issues.apache.org/jira/browse/XERCESJ-1097
     Project: Xerces2-J
        Type: Bug
  Components: JAXP (javax.xml.datatype)  
    Versions: 2.7.0, 2.7.1    
 Environment: Linux starscream 2.6.12-1.1447_FC4 #1 Fri Aug 26 20:29:51 EDT 2005 i686 i686 i386 GNU/Linux
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
    Reporter: George F. Willard III


PROBLEM:
The format method of XMLGregorianCalendarImpl may generate non-RFC3339 compliant strings because the toString method of BigDecimal defaults to using scientific "E-" notation instead of engineering notation.  I encountered this problem when unit testing JAX-WS pre-releases, and recreated it with a simple Calendar echo unit test that fails:

INPUT TO  echoCalendar WEB SERVICE: 0001-01-01T00:00:00.0000000-05:00
EXPECTED OUTPUT FROM  echoCalendar WEB SERVICE: 0001-01-01T00:00:00.0000000-05:00
ACTUAL OUTPUT FROM echoCalendar WEB SERVICE: 0001-01-01T00:00:00E-7-05:00

  ** Note that the fractionalSeconds were expressed in scientific "E-7" notation instead of engineering notation causing it to be interpreted as invalid by web service clients.

SUGGESTED FIX:
FILE: src/org/apache/xerces/jaxp/datatype/XMLGregorianCalendarImpl.java:2960

CURRENT: String frac = getFractionalSecond().toString(); 
SUGGESTED: String frac = getFractionalSecond().toPlainString();

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Reopened: (XERCESJ-1097) XMLGregorianCalendarImpl format method generates improperly formatted date string

Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XERCESJ-1097?page=all ]
     
Michael Glavassevich reopened XERCESJ-1097:
-------------------------------------------


Reopening so I can update the fix version field.

> XMLGregorianCalendarImpl format method generates improperly formatted date string
> ---------------------------------------------------------------------------------
>
>          Key: XERCESJ-1097
>          URL: http://issues.apache.org/jira/browse/XERCESJ-1097
>      Project: Xerces2-J
>         Type: Bug
>   Components: JAXP (javax.xml.datatype)
>     Versions: 2.7.0, 2.7.1
>  Environment: Linux starscream 2.6.12-1.1447_FC4 #1 Fri Aug 26 20:29:51 EDT 2005 i686 i686 i386 GNU/Linux
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
>     Reporter: George F. Willard III
>     Assignee: Michael Glavassevich
>      Fix For: 2.8.0

>
> PROBLEM:
> The format method of XMLGregorianCalendarImpl may generate non-RFC3339 compliant strings because the toString method of BigDecimal defaults to using scientific "E-" notation instead of engineering notation.  I encountered this problem when unit testing JAX-WS pre-releases, and recreated it with a simple Calendar echo unit test that fails:
> INPUT TO  echoCalendar WEB SERVICE: 0001-01-01T00:00:00.0000000-05:00
> EXPECTED OUTPUT FROM  echoCalendar WEB SERVICE: 0001-01-01T00:00:00.0000000-05:00
> ACTUAL OUTPUT FROM echoCalendar WEB SERVICE: 0001-01-01T00:00:00E-7-05:00
>   ** Note that the fractionalSeconds were expressed in scientific "E-7" notation instead of engineering notation causing it to be interpreted as invalid by web service clients.
> SUGGESTED FIX:
> FILE: src/org/apache/xerces/jaxp/datatype/XMLGregorianCalendarImpl.java:2960
> CURRENT: String frac = getFractionalSecond().toString(); 
> SUGGESTED: String frac = getFractionalSecond().toPlainString();

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Updated: (XERCESJ-1097) XMLGregorianCalendarImpl format method generates improperly formatted date string

Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XERCESJ-1097?page=all ]

Michael Glavassevich updated XERCESJ-1097:
------------------------------------------

    Fix Version: 2.8.0

> XMLGregorianCalendarImpl format method generates improperly formatted date string
> ---------------------------------------------------------------------------------
>
>          Key: XERCESJ-1097
>          URL: http://issues.apache.org/jira/browse/XERCESJ-1097
>      Project: Xerces2-J
>         Type: Bug
>   Components: JAXP (javax.xml.datatype)
>     Versions: 2.7.0, 2.7.1
>  Environment: Linux starscream 2.6.12-1.1447_FC4 #1 Fri Aug 26 20:29:51 EDT 2005 i686 i686 i386 GNU/Linux
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
>     Reporter: George F. Willard III
>     Assignee: Michael Glavassevich
>      Fix For: 2.8.0

>
> PROBLEM:
> The format method of XMLGregorianCalendarImpl may generate non-RFC3339 compliant strings because the toString method of BigDecimal defaults to using scientific "E-" notation instead of engineering notation.  I encountered this problem when unit testing JAX-WS pre-releases, and recreated it with a simple Calendar echo unit test that fails:
> INPUT TO  echoCalendar WEB SERVICE: 0001-01-01T00:00:00.0000000-05:00
> EXPECTED OUTPUT FROM  echoCalendar WEB SERVICE: 0001-01-01T00:00:00.0000000-05:00
> ACTUAL OUTPUT FROM echoCalendar WEB SERVICE: 0001-01-01T00:00:00E-7-05:00
>   ** Note that the fractionalSeconds were expressed in scientific "E-7" notation instead of engineering notation causing it to be interpreted as invalid by web service clients.
> SUGGESTED FIX:
> FILE: src/org/apache/xerces/jaxp/datatype/XMLGregorianCalendarImpl.java:2960
> CURRENT: String frac = getFractionalSecond().toString(); 
> SUGGESTED: String frac = getFractionalSecond().toPlainString();

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (XERCESJ-1097) XMLGregorianCalendarImpl format method generates improperly formatted date string

Posted by "George F. Willard III (JIRA)" <xe...@xml.apache.org>.
    [ http://issues.apache.org/jira/browse/XERCESJ-1097?page=comments#action_12322852 ] 

George F. Willard III commented on XERCESJ-1097:
------------------------------------------------

Fix verified on J2SE5.0.  Thank you!

> XMLGregorianCalendarImpl format method generates improperly formatted date string
> ---------------------------------------------------------------------------------
>
>          Key: XERCESJ-1097
>          URL: http://issues.apache.org/jira/browse/XERCESJ-1097
>      Project: Xerces2-J
>         Type: Bug
>   Components: JAXP (javax.xml.datatype)
>     Versions: 2.7.0, 2.7.1
>  Environment: Linux starscream 2.6.12-1.1447_FC4 #1 Fri Aug 26 20:29:51 EDT 2005 i686 i686 i386 GNU/Linux
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
>     Reporter: George F. Willard III
>     Assignee: Michael Glavassevich

>
> PROBLEM:
> The format method of XMLGregorianCalendarImpl may generate non-RFC3339 compliant strings because the toString method of BigDecimal defaults to using scientific "E-" notation instead of engineering notation.  I encountered this problem when unit testing JAX-WS pre-releases, and recreated it with a simple Calendar echo unit test that fails:
> INPUT TO  echoCalendar WEB SERVICE: 0001-01-01T00:00:00.0000000-05:00
> EXPECTED OUTPUT FROM  echoCalendar WEB SERVICE: 0001-01-01T00:00:00.0000000-05:00
> ACTUAL OUTPUT FROM echoCalendar WEB SERVICE: 0001-01-01T00:00:00E-7-05:00
>   ** Note that the fractionalSeconds were expressed in scientific "E-7" notation instead of engineering notation causing it to be interpreted as invalid by web service clients.
> SUGGESTED FIX:
> FILE: src/org/apache/xerces/jaxp/datatype/XMLGregorianCalendarImpl.java:2960
> CURRENT: String frac = getFractionalSecond().toString(); 
> SUGGESTED: String frac = getFractionalSecond().toPlainString();

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Assigned: (XERCESJ-1097) XMLGregorianCalendarImpl format method generates improperly formatted date string

Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XERCESJ-1097?page=all ]

Michael Glavassevich reassigned XERCESJ-1097:
---------------------------------------------

    Assign To: Michael Glavassevich

> XMLGregorianCalendarImpl format method generates improperly formatted date string
> ---------------------------------------------------------------------------------
>
>          Key: XERCESJ-1097
>          URL: http://issues.apache.org/jira/browse/XERCESJ-1097
>      Project: Xerces2-J
>         Type: Bug
>   Components: JAXP (javax.xml.datatype)
>     Versions: 2.7.0, 2.7.1
>  Environment: Linux starscream 2.6.12-1.1447_FC4 #1 Fri Aug 26 20:29:51 EDT 2005 i686 i686 i386 GNU/Linux
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
>     Reporter: George F. Willard III
>     Assignee: Michael Glavassevich

>
> PROBLEM:
> The format method of XMLGregorianCalendarImpl may generate non-RFC3339 compliant strings because the toString method of BigDecimal defaults to using scientific "E-" notation instead of engineering notation.  I encountered this problem when unit testing JAX-WS pre-releases, and recreated it with a simple Calendar echo unit test that fails:
> INPUT TO  echoCalendar WEB SERVICE: 0001-01-01T00:00:00.0000000-05:00
> EXPECTED OUTPUT FROM  echoCalendar WEB SERVICE: 0001-01-01T00:00:00.0000000-05:00
> ACTUAL OUTPUT FROM echoCalendar WEB SERVICE: 0001-01-01T00:00:00E-7-05:00
>   ** Note that the fractionalSeconds were expressed in scientific "E-7" notation instead of engineering notation causing it to be interpreted as invalid by web service clients.
> SUGGESTED FIX:
> FILE: src/org/apache/xerces/jaxp/datatype/XMLGregorianCalendarImpl.java:2960
> CURRENT: String frac = getFractionalSecond().toString(); 
> SUGGESTED: String frac = getFractionalSecond().toPlainString();

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Closed: (XERCESJ-1097) XMLGregorianCalendarImpl format method generates improperly formatted date string

Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XERCESJ-1097?page=all ]
     
Michael Glavassevich closed XERCESJ-1097:
-----------------------------------------


> XMLGregorianCalendarImpl format method generates improperly formatted date string
> ---------------------------------------------------------------------------------
>
>          Key: XERCESJ-1097
>          URL: http://issues.apache.org/jira/browse/XERCESJ-1097
>      Project: Xerces2-J
>         Type: Bug
>   Components: JAXP (javax.xml.datatype)
>     Versions: 2.7.0, 2.7.1
>  Environment: Linux starscream 2.6.12-1.1447_FC4 #1 Fri Aug 26 20:29:51 EDT 2005 i686 i686 i386 GNU/Linux
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
>     Reporter: George F. Willard III
>     Assignee: Michael Glavassevich

>
> PROBLEM:
> The format method of XMLGregorianCalendarImpl may generate non-RFC3339 compliant strings because the toString method of BigDecimal defaults to using scientific "E-" notation instead of engineering notation.  I encountered this problem when unit testing JAX-WS pre-releases, and recreated it with a simple Calendar echo unit test that fails:
> INPUT TO  echoCalendar WEB SERVICE: 0001-01-01T00:00:00.0000000-05:00
> EXPECTED OUTPUT FROM  echoCalendar WEB SERVICE: 0001-01-01T00:00:00.0000000-05:00
> ACTUAL OUTPUT FROM echoCalendar WEB SERVICE: 0001-01-01T00:00:00E-7-05:00
>   ** Note that the fractionalSeconds were expressed in scientific "E-7" notation instead of engineering notation causing it to be interpreted as invalid by web service clients.
> SUGGESTED FIX:
> FILE: src/org/apache/xerces/jaxp/datatype/XMLGregorianCalendarImpl.java:2960
> CURRENT: String frac = getFractionalSecond().toString(); 
> SUGGESTED: String frac = getFractionalSecond().toPlainString();

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Resolved: (XERCESJ-1097) XMLGregorianCalendarImpl format method generates improperly formatted date string

Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XERCESJ-1097?page=all ]
     
Michael Glavassevich resolved XERCESJ-1097:
-------------------------------------------

    Resolution: Fixed

BigDecimal.toPlainString() is only available on J2SE 5.0 and above. Since Xerces-J still supports J2SE 1.2, 1.3 and 1.4 we cannot call this method. I went with alternative fix which uses a custom method for converting BigDecimal to a string.  Should be fixed in CVS.  Could you please verify?

> XMLGregorianCalendarImpl format method generates improperly formatted date string
> ---------------------------------------------------------------------------------
>
>          Key: XERCESJ-1097
>          URL: http://issues.apache.org/jira/browse/XERCESJ-1097
>      Project: Xerces2-J
>         Type: Bug
>   Components: JAXP (javax.xml.datatype)
>     Versions: 2.7.0, 2.7.1
>  Environment: Linux starscream 2.6.12-1.1447_FC4 #1 Fri Aug 26 20:29:51 EDT 2005 i686 i686 i386 GNU/Linux
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
>     Reporter: George F. Willard III
>     Assignee: Michael Glavassevich

>
> PROBLEM:
> The format method of XMLGregorianCalendarImpl may generate non-RFC3339 compliant strings because the toString method of BigDecimal defaults to using scientific "E-" notation instead of engineering notation.  I encountered this problem when unit testing JAX-WS pre-releases, and recreated it with a simple Calendar echo unit test that fails:
> INPUT TO  echoCalendar WEB SERVICE: 0001-01-01T00:00:00.0000000-05:00
> EXPECTED OUTPUT FROM  echoCalendar WEB SERVICE: 0001-01-01T00:00:00.0000000-05:00
> ACTUAL OUTPUT FROM echoCalendar WEB SERVICE: 0001-01-01T00:00:00E-7-05:00
>   ** Note that the fractionalSeconds were expressed in scientific "E-7" notation instead of engineering notation causing it to be interpreted as invalid by web service clients.
> SUGGESTED FIX:
> FILE: src/org/apache/xerces/jaxp/datatype/XMLGregorianCalendarImpl.java:2960
> CURRENT: String frac = getFractionalSecond().toString(); 
> SUGGESTED: String frac = getFractionalSecond().toPlainString();

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


[jira] Closed: (XERCESJ-1097) XMLGregorianCalendarImpl format method generates improperly formatted date string

Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XERCESJ-1097?page=all ]
     
Michael Glavassevich closed XERCESJ-1097:
-----------------------------------------

    Resolution: Fixed

> XMLGregorianCalendarImpl format method generates improperly formatted date string
> ---------------------------------------------------------------------------------
>
>          Key: XERCESJ-1097
>          URL: http://issues.apache.org/jira/browse/XERCESJ-1097
>      Project: Xerces2-J
>         Type: Bug
>   Components: JAXP (javax.xml.datatype)
>     Versions: 2.7.0, 2.7.1
>  Environment: Linux starscream 2.6.12-1.1447_FC4 #1 Fri Aug 26 20:29:51 EDT 2005 i686 i686 i386 GNU/Linux
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_04-b05)
>     Reporter: George F. Willard III
>     Assignee: Michael Glavassevich
>      Fix For: 2.8.0

>
> PROBLEM:
> The format method of XMLGregorianCalendarImpl may generate non-RFC3339 compliant strings because the toString method of BigDecimal defaults to using scientific "E-" notation instead of engineering notation.  I encountered this problem when unit testing JAX-WS pre-releases, and recreated it with a simple Calendar echo unit test that fails:
> INPUT TO  echoCalendar WEB SERVICE: 0001-01-01T00:00:00.0000000-05:00
> EXPECTED OUTPUT FROM  echoCalendar WEB SERVICE: 0001-01-01T00:00:00.0000000-05:00
> ACTUAL OUTPUT FROM echoCalendar WEB SERVICE: 0001-01-01T00:00:00E-7-05:00
>   ** Note that the fractionalSeconds were expressed in scientific "E-7" notation instead of engineering notation causing it to be interpreted as invalid by web service clients.
> SUGGESTED FIX:
> FILE: src/org/apache/xerces/jaxp/datatype/XMLGregorianCalendarImpl.java:2960
> CURRENT: String frac = getFractionalSecond().toString(); 
> SUGGESTED: String frac = getFractionalSecond().toPlainString();

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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