LANG-1247: FastDatePrinter generates Date objects wastefully
closes #168
This commit is contained in:
parent
03384395a8
commit
caaf97ed88
|
@ -46,6 +46,7 @@ The <action> type attribute can be add,update,fix,remove.
|
|||
<body>
|
||||
|
||||
<release version="3.5" date="tba" description="tba">
|
||||
<action issue="LANG-1247" type="update" dev="chas" due-to="Benoit Wiart">FastDatePrinter generates extra Date objects</action>
|
||||
<action issue="LANG-1018" type="fix" dev="pschumacher" due-to="Nick Manley">Fix precision loss on NumberUtils.createNumber(String)</action>
|
||||
<action issue="LANG-1229" type="update" dev="pschumacher" due-to="Ruslan Cheremin">HashCodeBuilder.append(Object,Object) is too big to be inlined, which prevents whole builder to be scalarized</action>
|
||||
<action issue="LANG-1085" type="add" dev="oheger" due-to="oheger / kinow">Add a circuit breaker implementation</action>
|
||||
|
|
|
@ -486,7 +486,9 @@ public class FastDatePrinter implements DatePrinter, Serializable {
|
|||
*/
|
||||
@Override
|
||||
public StringBuffer format(final long millis, final StringBuffer buf) {
|
||||
return format(new Date(millis), buf);
|
||||
final Calendar c = newCalendar();
|
||||
c.setTimeInMillis(millis);
|
||||
return applyRules(c, buf);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -513,7 +515,9 @@ public class FastDatePrinter implements DatePrinter, Serializable {
|
|||
*/
|
||||
@Override
|
||||
public <B extends Appendable> B format(final long millis, final B buf) {
|
||||
return format(new Date(millis), buf);
|
||||
final Calendar c = newCalendar();
|
||||
c.setTimeInMillis(millis);
|
||||
return applyRules(c, buf);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
|
Loading…
Reference in New Issue