Skip to content

Commit

Permalink
Fix IAE when enabling debug logging on PersistenceManagerImpl (#1737)
Browse files Browse the repository at this point in the history
Signed-off-by: Wouter Born <github@maindrain.net>
  • Loading branch information
wborn committed Oct 19, 2020
1 parent 7d70a97 commit 0ac14b9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
*/
package org.openhab.core.persistence.internal;

import java.text.DateFormat;
import java.time.format.DateTimeFormatter;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
Expand Down Expand Up @@ -291,7 +291,7 @@ private void initialize(Item item) {
genericItem.addStateChangeListener(this);
if (logger.isDebugEnabled()) {
logger.debug("Restored item state from '{}' for item '{}' -> '{}'",
DateFormat.getDateTimeInstance()
DateTimeFormatter.ISO_ZONED_DATE_TIME
.format(historicItem.getTimestamp()),
item.getName(), historicItem.getState());
}
Expand Down

0 comments on commit 0ac14b9

Please sign in to comment.