From 6a95c9231a1bcacba6c5964ffb7f8ec4d2ed7a8d Mon Sep 17 00:00:00 2001 From: Mike Primm Date: Mon, 21 Feb 2022 18:51:31 -0600 Subject: [PATCH] Zap dynmap_webchat.json if error parsing it --- .../src/main/java/org/dynmap/JsonFileClientUpdateComponent.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/DynmapCore/src/main/java/org/dynmap/JsonFileClientUpdateComponent.java b/DynmapCore/src/main/java/org/dynmap/JsonFileClientUpdateComponent.java index 0135a5e9..c3a2f5b7 100644 --- a/DynmapCore/src/main/java/org/dynmap/JsonFileClientUpdateComponent.java +++ b/DynmapCore/src/main/java/org/dynmap/JsonFileClientUpdateComponent.java @@ -484,8 +484,10 @@ public class JsonFileClientUpdateComponent extends ClientUpdateComponent { jsonMsgs = (JSONArray) parser.parse(inputFileReader); } catch (IOException ex) { Log.severe("Exception while reading JSON-file.", ex); + storage.setStandaloneFile("dynmap_webchat.json", null); // Delete it } catch (ParseException ex) { Log.severe("Exception while parsing JSON-file.", ex); + storage.setStandaloneFile("dynmap_webchat.json", null); // Delete it } finally { if(inputFileReader != null) { try {