commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Müller (Commented) (JIRA) <j...@apache.org>
Subject [jira] [Commented] (LANG-462) FastDateFormat supports parse
Date Sun, 19 Feb 2012 16:24:40 GMT

    [ https://issues.apache.org/jira/browse/LANG-462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13211396#comment-13211396
] 

Felix Müller commented on LANG-462:
-----------------------------------

Seems that I should have installed a pure JDK 5 on my machine and run the maven build with
java-1.5 profile first: As you can see on the CI server, I forgot one java 6 dependency. I
also fixed this with the next attached patch.

With the use of JDK 5 the FastDateParser has a really curious problem. One of the test patterns
causes the parser to end up in an infinite loop. I debugged through the code: In JDK 5 the
Pattern.compile method seems to be buggy. You can reproduce the problem when you look into
FastDatePrinterTest line 115/116 (with the merged patch) and run the test class FastDateFormat_PrinterTest.
To secure the test I added a timeout of 20 seconds.

The attached patch consists of the fully Java 5 compatible classes (I successfully run "mvn
clean package -Pjava-1.5"), some minor clean up and the semi-fixed test.

I don't know if it would be good to release a class where we cannot say under what circumstances
it will crash or end up in an infinite loop.
                
> FastDateFormat supports parse
> -----------------------------
>
>                 Key: LANG-462
>                 URL: https://issues.apache.org/jira/browse/LANG-462
>             Project: Commons Lang
>          Issue Type: New Feature
>          Components: lang.time.*
>            Reporter: Franz Wong
>             Fix For: 3.2
>
>         Attachments: DateParser.patch, LANG-462-FormatCache.patch, LANG-462-Hen.patch,
LANG-462_buildfix.patch, LANG-462_buildfix_pending_java6_issues.patch, UseFormatCache.patch,
lang462.patch, with_interfaces.patch, with_interfaces2.patch, with_updated_tests.patch
>
>
> Currently FastDateFormat only supports formatting the ISO8601 time zone, however, it
doesn't support parsing such string to Date.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message