[jira] [Commented] (LANG-462) FastDateFormat supports parse
[ https://issues.apache.org/jira/browse/LANG-462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13211425#comment-13211425 ] Felix Müller commented on LANG-462: --- Well, that would of course solve the problem. And I would appreciate this. Nevertheless, I would like to understand the problem with JDK 5 and the Pattern.compile call. Just for my own sake. :-) > 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
[jira] [Commented] (LANG-462) FastDateFormat supports parse
[ https://issues.apache.org/jira/browse/LANG-462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13211408#comment-13211408 ] Gary D. Gregory commented on LANG-462: -- Why not just upgrade [lang] to Java 6? This is a good time as any... > 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
[jira] [Commented] (LANG-462) FastDateFormat supports parse
[ 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
[jira] [Commented] (LANG-462) FastDateFormat supports parse
[ https://issues.apache.org/jira/browse/LANG-462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13192687#comment-13192687 ] Charles Honton commented on LANG-462: - 1. Methods "FastDateFormat$NumberRule selectNumberRule(int, int)" and "List parsePattern()" couldn't have been overridden because NumberRule and Rule were private to FastDateFormat. 2. Due to the factory pattern used, it's unlikely other two methods would have been overridden. 3. The four methods are highly implementation specific. I consider it a mistake that the methods were exposed. > 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.x > > Attachments: DateParser.patch, LANG-462-FormatCache.patch, > LANG-462-Hen.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
[jira] [Commented] (LANG-462) FastDateFormat supports parse
[ https://issues.apache.org/jira/browse/LANG-462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13192040#comment-13192040 ] Henri Yandell commented on LANG-462: Thanks Charles - that does indeed apply cleanly :) A couple of FindBugs errors pop up for FormatCache$MultipartKey. Looks very fixable. The big question, as you pointed out, is the removal of the four protected methods. They've been there since the code was added in Lang 2.0, and as there's no way to know if they've been used I expect the mailing list to fairly unhappy at the idea of removing the methods. Any reason why you couldn't have the four methods sitting on top of the underlying printer? We could deprecate them for removal in 4.0. > 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.x > > Attachments: DateParser.patch, LANG-462-FormatCache.patch, > LANG-462-Hen.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
[jira] [Commented] (LANG-462) FastDateFormat supports parse
[ https://issues.apache.org/jira/browse/LANG-462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13188210#comment-13188210 ] Henri Yandell commented on LANG-462: The patch with_interfaces fails (two rejects); could you recreate against trunk? I've tried on its own and after with_updated just in case but both times hit fails. > 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.x > > Attachments: DateParser.patch, LANG-462-FormatCache.patch, > LANG-462-Hen.patch, UseFormatCache.patch, lang462.patch, > with_interfaces.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
[jira] [Commented] (LANG-462) FastDateFormat supports parse
[ https://issues.apache.org/jira/browse/LANG-462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13185447#comment-13185447 ] Henri Yandell commented on LANG-462: Not sure if you have any time to add that to your patch, but I think that would be great :) > 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.x > > Attachments: DateParser.patch, LANG-462-FormatCache.patch, > LANG-462-Hen.patch, UseFormatCache.patch, lang462.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
[jira] [Commented] (LANG-462) FastDateFormat supports parse
[ https://issues.apache.org/jira/browse/LANG-462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13185089#comment-13185089 ] Charles Honton commented on LANG-462: - The reason to keep separate would be to prevent code clutter. Also, if you only want parse or only want format, why pay the price of initializing the other portion of code. I was thinking of creating a new class, FastDatePrinter, which contains the current FastDateFormat code. Then, fill FastDateFormat with delegation to the FastDatePrinter and FastDateParser classes. > 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.x > > Attachments: DateParser.patch, LANG-462-FormatCache.patch, > LANG-462-Hen.patch, UseFormatCache.patch, lang462.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
[jira] [Commented] (LANG-462) FastDateFormat supports parse
[ https://issues.apache.org/jira/browse/LANG-462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13184797#comment-13184797 ] Henri Yandell commented on LANG-462: Thanks Charles, that fixes the tests :) Except for the odd failing locales that you noted as System.outs. Going back to your very early question - any thoughts on whether there are any reasons why it couldn't be in FastDateFormat? > 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.x > > Attachments: DateParser.patch, LANG-462-FormatCache.patch, > LANG-462-Hen.patch, UseFormatCache.patch, lang462.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
[jira] [Commented] (LANG-462) FastDateFormat supports parse
[ https://issues.apache.org/jira/browse/LANG-462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13021999#comment-13021999 ] Henri Yandell commented on LANG-462: Apologies - I get your question now Charles. I've added the UseFormatCache patch, and the FormatCache class (though I've removed the public keyword for now). svn ci -m "Refactoring FastDateFormat per LANG-462 to use the FormatCache class created for an upcoming DateParser functionality. I've kept FormatCache package-private for now. " Sendingsrc/main/java/org/apache/commons/lang3/time/FastDateFormat.java Adding src/main/java/org/apache/commons/lang3/time/FormatCache.java Sending src/test/java/org/apache/commons/lang3/time/FastDateFormatTest.java Transmitting file data ... Committed revision 1095299. This drops the unnecessary getTimeZoneOverridesCalendar() method from the 3.0 API. > 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.x > > Attachments: DateParser.patch, LANG-462-FormatCache.patch, > LANG-462-Hen.patch, UseFormatCache.patch, lang462.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. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (LANG-462) FastDateFormat supports parse
[ https://issues.apache.org/jira/browse/LANG-462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13018564#comment-13018564 ] Charles Honton commented on LANG-462: - Can at least UseFormatCache patch be applied in 3.0 since it contains the api breaker? > 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.x > > Attachments: LANG-462-Hen.patch, UseFormatCache.patch, lang462.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. For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (LANG-462) FastDateFormat supports parse
[ https://issues.apache.org/jira/browse/LANG-462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12985262#action_12985262 ] Henri Yandell commented on LANG-462: One failed test (line :294) is due to a missing 'Z' in the format text. You have to keep the timezone there if you expect to go from date to string and back again. Easy fix. The other seems to be due to weakness in SimpleDateFormat(line :349)(?). For pattern "G/y/M/d/a/E", I get output of "??/03/2/9/??/?". That is, 'G', 'a' and 'E' all seeming to fail when called on the JDK's SimpleDateFormat. Seems odd - might be an OS X thing. For pattern "/////", I get "??/2003/2?/0009/??/???". > 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.0 > > Attachments: lang462.patch, UseFormatCache.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. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (LANG-462) FastDateFormat supports parse
[ https://issues.apache.org/jira/browse/LANG-462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12982493#action_12982493 ] Henri Yandell commented on LANG-462: Note, two separate patches. Apply both (confused me for a bit). UseFormatCache has a slight clash, but easy to fix. Two test failures. Failed tests: testLocales(org.apache.commons.lang3.time.FastDateParserTest) testParseLongShort(org.apache.commons.lang3.time.FastDateParserTest) testLocales(org.apache.commons.lang3.time.FastDateParserTest) Time elapsed: 0.046 sec <<< FAILURE! java.lang.AssertionError: expected: but was: at org.apache.commons.lang3.time.FastDateParserTest.testLocales(FastDateParserTest.java:349) and testParseLongShort(org.apache.commons.lang3.time.FastDateParserTest) Time elapsed: 0.03 sec <<< FAILURE! java.lang.AssertionError: expected: but was: at org.apache.commons.lang3.time.FastDateParserTest.testParseLongShort(FastDateParserTest.java:294) Probably timezone pain. > 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.0 > > Attachments: lang462.patch, UseFormatCache.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. - You can reply to this email to add a comment to the issue online.
[jira] Commented: (LANG-462) FastDateFormat supports parse
[ https://issues.apache.org/jira/browse/LANG-462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12791827#action_12791827 ] Henri Yandell commented on LANG-462: Note that LANG-530 led to DateUtils.parseDate allowing for the ISO8601 time zone to be parsed when it appears on the end of the pattern. > 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.x > > > 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. - You can reply to this email to add a comment to the issue online.