You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary Gregory (JIRA)" <ji...@apache.org> on 2012/11/06 02:50:12 UTC
[jira] [Created] (LANG-849) FastDateFormat generates Date objects
wastefully
Gary Gregory created LANG-849:
---------------------------------
Summary: FastDateFormat 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
[jira] [Updated] (LANG-849) FastDateFormat and FastDatePrinter
generates Date objects wastefully
Posted by "Gary Gregory (JIRA)" <ji...@apache.org>.
[ 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
[jira] [Resolved] (LANG-849) FastDateFormat and FastDatePrinter
generates Date objects wastefully
Posted by "Gary Gregory (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LANG-849?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Gary Gregory resolved LANG-849.
-------------------------------
Resolution: Fixed
commit -m "[LANG-849] FastDateFormat generates Date objects wastefully." C:/svn/org/apache/commons/trunks-proper/lang/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java C:/svn/org/apache/commons/trunks-proper/lang/src/main/java/org/apache/commons/lang3/time/FastDateFormat.java C:/svn/org/apache/commons/trunks-proper/lang/src/changes/changes.xml
Sending C:/svn/org/apache/commons/trunks-proper/lang/src/changes/changes.xml
Sending C:/svn/org/apache/commons/trunks-proper/lang/src/main/java/org/apache/commons/lang3/time/FastDateFormat.java
Sending C:/svn/org/apache/commons/trunks-proper/lang/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java
Transmitting file data ...
Committed revision 1406026.
commit -m "[LANG-849] FastDateFormat and FastDatePrinter generates Date objects wastefully." C:/svn/org/apache/commons/trunks-proper/lang/src/changes/changes.xml
Sending C:/svn/org/apache/commons/trunks-proper/lang/src/changes/changes.xml
Transmitting file data ...
Committed revision 1406027.
> 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