You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Mauro Molinari (JIRA)" <ji...@apache.org> on 2009/12/01 17:08:20 UTC
[jira] Commented: (AXIS2-4099) ConverterUtil.convertToDateTime() is
to lenient
[ https://issues.apache.org/jira/browse/AXIS2-4099?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12784274#action_12784274 ]
Mauro Molinari commented on AXIS2-4099:
---------------------------------------
The problem also occurs with Sun JRE 1.5.0_05. I suspect the problem might be related to Sun bug #6231602 (http://bugs.sun.com/view_bug.do?bug_id=6231602): if so, it's marked as fixed in 1.5.0_06.
The stack trace in 1.5.0_05 is the following:
Caused by: java.lang.IllegalArgumentException: ZONE_OFFSET
at java.util.GregorianCalendar.computeTime(GregorianCalendar.java:2461)
at java.util.Calendar.updateTime(Calendar.java:2260)
at java.util.Calendar.getTimeInMillis(Calendar.java:1044)
at org.apache.axis2.databinding.utils.ConverterUtil.convertToDate(ConverterUtil.java:619)
[...]
> ConverterUtil.convertToDateTime() is to lenient
> -----------------------------------------------
>
> Key: AXIS2-4099
> URL: https://issues.apache.org/jira/browse/AXIS2-4099
> Project: Axis 2.0 (Axis2)
> Issue Type: Bug
> Components: adb
> Affects Versions: 1.4.1, 1.4, 1.3
> Reporter: Marcel Ammerlaan
> Priority: Minor
> Attachments: DateTimeBug.java
>
>
> When parsing an invalid date (as specified by the XSD Schema specification), Axis relies on the java.util.Calendar leniency to parse. E.g. 2008-02-31 (31st of februari) is invalid according to http://www.w3.org/TR/xmlschema-2/#dateTime. convertToDateTime() returns the 2nd of march instead.
> This can be easily solved by setting the Calender leniency to false (setLenient(false)).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.