Skip to content

Commit

Permalink
Fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
asvitkine committed Jul 16, 2023
1 parent f57c9b0 commit 6fb5767
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,14 @@ private void fixUpNullPlayers() {
}
}

@RemoveOnNextMajorRelease
public void fixUpNullPlayersInDelegates() {
BattleDelegate battleDelegate = (BattleDelegate) getDelegate("battle");
if (battleDelegate != null) {
battleDelegate.getBattleTracker().fixUpNullPlayers(playerList.getNullPlayer());
}
}

public interface Unlocker extends Closeable {
@Override
void close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,7 @@ public static Optional<GameData> loadGameUncompressed(final InputStream is) {
final GameData data = (GameData) input.readObject();
data.postDeSerialize();
loadDelegates(input, data);
data.getBattleDelegate()
.getBattleTracker()
.fixUpNullPlayers(data.getPlayerList().getNullPlayer());
data.fixUpNullPlayersInDelegates();
return Optional.of(data);
} catch (final Throwable e) {
log.warn(
Expand Down

0 comments on commit 6fb5767

Please sign in to comment.