Skip to content

Commit

Permalink
Fix IAE when enabling debug logging on PersistenceManagerImpl (openha…
Browse files Browse the repository at this point in the history
…b#1737)

Signed-off-by: Wouter Born <github@maindrain.net>
GitOrigin-RevId: 0ac14b9
  • Loading branch information
wborn authored and splatch committed Jul 11, 2023
1 parent 233c4c1 commit 9c13907
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 9c13907

Please sign in to comment.