Make DateFormatter threadsafe

This commit is contained in:
Brian Pellin committed 2017-11-21 20:40:55 -06:00
1 parent 2dae805ac0
commit 924db245ec
3 files changed
+14 -11

No files matched your search

@@ -480,7 +480,7 @@ public class PwDbV4Output extends PwDbOutput {
private void writeObject(String name, Date value) throws IllegalArgumentException, IllegalStateException, IOException {
if (header.version < PwDbHeaderV4.FILE_VERSION_32_4) {
writeObject(name, PwDatabaseV4XML.dateFormat.format(value));
writeObject(name, PwDatabaseV4XML.dateFormatter.get().format(value));
} else {
DateTime dt = new DateTime(value);
long seconds = DateUtil.convertDateToKDBX4Time(dt);