mirror of
https://github.com/ViaVersion/ViaFabricPlus.git
synced 2024-11-22 11:56:21 +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() {
|
public void init() {
|
||||||
if (file.exists()) {
|
if (file.exists()) {
|
||||||
JsonObject parentNode = null;
|
JsonObject parentNode = null;
|
||||||
try {
|
try (final FileReader fr = new FileReader(file)) {
|
||||||
parentNode = ViaFabricPlus.GSON.fromJson(new FileReader(file), JsonObject.class).getAsJsonObject();
|
parentNode = ViaFabricPlus.GSON.fromJson(fr, JsonObject.class);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user