diff --git a/game-app/game-core/src/main/java/games/strategy/engine/history/History.java b/game-app/game-core/src/main/java/games/strategy/engine/history/History.java index 6ec8c781e0f..a36383065a7 100644 --- a/game-app/game-core/src/main/java/games/strategy/engine/history/History.java +++ b/game-app/game-core/src/main/java/games/strategy/engine/history/History.java @@ -56,7 +56,6 @@ public HistoryWriter getHistoryWriter() { } public HistoryNode enableSeeking(final HistoryPanel panel) { - Preconditions.checkNotNull(panel); Preconditions.checkState(!seekingEnabled); this.panel = panel; nextChangeIndex = changes.size(); diff --git a/game-app/game-headed/src/main/java/games/strategy/triplea/ui/menubar/ExportMenu.java b/game-app/game-headed/src/main/java/games/strategy/triplea/ui/menubar/ExportMenu.java index c7fc007d873..2cbd28c7a55 100644 --- a/game-app/game-headed/src/main/java/games/strategy/triplea/ui/menubar/ExportMenu.java +++ b/game-app/game-headed/src/main/java/games/strategy/triplea/ui/menubar/ExportMenu.java @@ -167,8 +167,7 @@ private void createAndSaveStats(final boolean showPhaseStats) { if (clone == null) { return; } - try (PrintWriter writer = - new PrintWriter(chooser.getSelectedFile(), StandardCharsets.UTF_8.toString()); + try (PrintWriter writer = new PrintWriter(chooser.getSelectedFile(), StandardCharsets.UTF_8); GameData.Unlocker ignored = gameData.acquireReadLock()) { writer.append(defaultFileName).println(','); writer.append("TripleA Engine Version: ,"); @@ -257,8 +256,7 @@ private void createAndSaveStats(final boolean showPhaseStats) { final List players = clone.getPlayerList().getSortedPlayers(); // extended stats covers stuff that doesn't show up in the game stats menu bar, like custom - // resources or tech - // tokens or # techs, etc. + // resources or tech tokens or # techs, etc. final Iterable stats = Iterables.concat( List.of(statPanel.getStats()), List.of(statPanel.getStatsExtended(gameData))); @@ -273,6 +271,7 @@ private void createAndSaveStats(final boolean showPhaseStats) { } } writer.println(); + clone.getHistory().enableSeeking(null); clone.getHistory().gotoNode(clone.getHistory().getLastNode()); final Enumeration nodes = ((DefaultMutableTreeNode) clone.getHistory().getRoot()).preorderEnumeration();