commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (LANG-849) FastDateFormat and FastDatePrinter generates Date objects wastefully
Date Tue, 06 Nov 2012 02:00:12 GMT

     [ https://issues.apache.org/jira/browse/LANG-849?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Gary Gregory updated LANG-849:
------------------------------

    Summary: FastDateFormat and FastDatePrinter generates Date objects wastefully  (was: FastDateFormat
generates Date objects wastefully)
    
> FastDateFormat and FastDatePrinter generates Date objects wastefully
> --------------------------------------------------------------------
>
>                 Key: LANG-849
>                 URL: https://issues.apache.org/jira/browse/LANG-849
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.time.*
>    Affects Versions: 3.1
>         Environment: Apache Maven 3.0.4 (r1232337; 2012-01-17 03:44:56-0500)
> Maven home: C:\Java\apache-maven-3.0.4\bin\..
> Java version: 1.6.0_35, vendor: Sun Microsystems Inc.
> Java home: C:\Program Files\Java\jdk1.6.0_35\jre
> Default locale: en_US, platform encoding: Cp1252
> OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
>            Reporter: Gary Gregory
>            Assignee: Gary Gregory
>             Fix For: 3.2
>
>
> The code:
>     @Override
>     public String format(long millis) {
>         return format(new Date(millis));
>     }
> should be:
>     @Override
>     public String format(long millis) {
>         return printer.format(millis);
>     }
> There is no need to create the extra Date object.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message