forked from SteamWar/SteamWar
Hotfix TraceRepository
This commit is contained in:
+6
-1
@@ -31,7 +31,12 @@ public class TraceRepository {
|
|||||||
public static Trace readTrace(File recordsFile) {
|
public static Trace readTrace(File recordsFile) {
|
||||||
@Cleanup
|
@Cleanup
|
||||||
ObjectInputStream reader = new ObjectInputStream(new GZIPInputStream(new FileInputStream(recordsFile)));
|
ObjectInputStream reader = new ObjectInputStream(new GZIPInputStream(new FileInputStream(recordsFile)));
|
||||||
UUID uuid = UUID.fromString(reader.readUTF());
|
UUID uuid;
|
||||||
|
try {
|
||||||
|
uuid = UUID.fromString(reader.readUTF());
|
||||||
|
} catch (IllegalArgumentException e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
Region region = RegionSystem.INSTANCE.getRegion(UUID.fromString(reader.readUTF())).orElse(null);
|
Region region = RegionSystem.INSTANCE.getRegion(UUID.fromString(reader.readUTF())).orElse(null);
|
||||||
if (region == null) return null;
|
if (region == null) return null;
|
||||||
Date date = (Date) reader.readObject();
|
Date date = (Date) reader.readObject();
|
||||||
|
|||||||
Reference in New Issue
Block a user