Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 871C910798 for ; Fri, 2 May 2014 12:28:26 +0000 (UTC) Received: (qmail 43241 invoked by uid 500); 2 May 2014 12:28:25 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 42037 invoked by uid 500); 2 May 2014 12:28:17 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 41981 invoked by uid 99); 2 May 2014 12:28:14 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 May 2014 12:28:14 +0000 Date: Fri, 2 May 2014 12:28:14 +0000 (UTC) From: "Michael Osipov (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (LANG-1004) DurationFormatUtils#formatDurationHMS implementation does not correspond to Javadoc and vice versa MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LANG-1004?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael Osipov updated LANG-1004: --------------------------------- Description: 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. was: 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 omits the second fraction. Since the use of fractions is optional, the method should use "HH:mm:ss" and update the Javadoc as well. > 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 > Fix For: Patch Needed > > > 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)