[
https://issues.apache.org/jira/browse/LANG-1004?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13989015#comment-13989015
]
Benedikt Ritter commented on LANG-1004:
---------------------------------------
{code}
bene@localhost:~/workspace/apache/commons/lang$ svn ci -m "LANG-1004:
DurationFormatUtils#formatDurationHMS implementation does not correspond to
Javadoc and vice versa. Thanks to Michael Osipov"
Sending src/changes/changes.xml
Sending
src/main/java/org/apache/commons/lang3/time/DurationFormatUtils.java
Sending
src/test/java/org/apache/commons/lang3/time/DurationFormatUtilsTest.java
Sending src/test/java/org/apache/commons/lang3/time/StopWatchTest.java
Transmitting file data ....
Committed revision 1592360.
{code}
Thanks for contributing!
> DurationFormatUtils#formatDurationHMS implementation does not correspond to
> Javadoc and vice versa
> --------------------------------------------------------------------------------------------------
>
> Key: LANG-1004
> URL: https://issues.apache.org/jira/browse/LANG-1004
> Project: Commons Lang
> Issue Type: Bug
> Components: lang.text.*
> Affects Versions: 3.3.2
> Reporter: Michael Osipov
> Assignee: Benedikt Ritter
> Fix For: 3.4
>
> Attachments: LANG-1004.patch
>
>
> This method has several flaws:
> 1. Javadoc says: "The format used is ISO8601-like: H:m:s.S." but the method
> call supplies "H:mm:ss.SSS"
> 2. ISO time never omits leading zeros, so the proper pattern must be
> "HH:mm:ss.SSS"
> 3. The method name says: "HMS" but includes the second fraction.
> Since the use of fractions is optional, the method should use "HH:mm:ss" and
> update the Javadoc as well.
--
This message was sent by Atlassian JIRA
(v6.2#6252)