mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2024-11-02 08:59:31 +01:00
FileSaver close FileReader (#252)
* Update FileSaver.java * Update FileSaver.java
This commit is contained in:
parent
c6cb3c0ee2
commit
fa36d64a74
@ -43,8 +43,8 @@ public abstract class FileSaver {
|
||||
public void init() {
|
||||
if (file.exists()) {
|
||||
JsonObject parentNode = null;
|
||||
try {
|
||||
parentNode = ViaFabricPlus.GSON.fromJson(new FileReader(file), JsonObject.class).getAsJsonObject();
|
||||
try (final FileReader fr = new FileReader(file)) {
|
||||
parentNode = ViaFabricPlus.GSON.fromJson(fr, JsonObject.class);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user