Use buf.add(char) when there is a single character string
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@
1137925 13f79535-47bb-0310-9956-
ffa450edef68
*/
private static final ThreadLocal<DateFormatCache> localDateCache =
new ThreadLocal<DateFormatCache>() {
+ @Override
protected DateFormatCache initialValue() {
return new DateFormatCache(localCacheSize, timeFormat, globalDateCache);
}
protected void addTimestamp(StringBuilder buf, long timestamp) {
buf.append(localDateCache.get().getFormat(timestamp));
long frac = timestamp % 1000;
- buf.append(".");
+ buf.append('.');
if (frac < 100) {
if (frac < 10) {
buf.append("00");
} else {
- buf.append("0");
+ buf.append('0');
}
}
buf.append(frac);