public final class AddressBookResultHandler extends ResultHandler {
+ private static final DateFormat DATE_FORMAT = new SimpleDateFormat("yyyyMMdd");
+
private final boolean[] mFields;
private int mButtonCount;
String birthday = result.getBirthday();
if (birthday != null && birthday.length() > 0) {
- DateFormat format = new SimpleDateFormat("yyyyMMdd");
- Date date = format.parse(birthday, new ParsePosition(0));
+ Date date;
+ synchronized (DATE_FORMAT) {
+ date = DATE_FORMAT.parse(birthday, new ParsePosition(0));
+ }
ParsedResult.maybeAppend(DateFormat.getDateInstance().format(date.getTime()), contents);
}
ParsedResult.maybeAppend(result.getNote(), contents);