Fix chatfile - shouldn't have changed this with last fix

This commit is contained in:
Mike Primm 2011-06-01 03:31:43 +08:00 committed by mikeprimm
parent 852c185b0b
commit aa7d80407f

View File

@ -127,15 +127,12 @@ public class JsonFileClientUpdateComponent extends ClientUpdateComponent {
protected void handleWebChat() {
File webchatFile = getStandaloneFile("dynmap_webchat.json");
File webchatTempFile = getStandaloneFile("dynmap_webchat.json.new");
if (webchatFile.exists() && lastTimestamp != 0) {
JSONArray jsonMsgs = null;
try {
FileReader inputFileReader = new FileReader(webchatTempFile);
FileReader inputFileReader = new FileReader(webchatFile);
jsonMsgs = (JSONArray) parser.parse(inputFileReader);
inputFileReader.close();
webchatFile.delete();
webchatTempFile.renameTo(webchatFile);
} catch (IOException ex) {
Log.severe("Exception while reading JSON-file.", ex);
} catch (ParseException ex) {