рефакторинг. ввел оберточные методы работы с json объектами

This commit is contained in:
2023-09-29 22:17:44 +03:00
parent 760707e6fb
commit 7d40091878
13 changed files with 58 additions and 103 deletions

View File

@@ -1,7 +1,6 @@
package Common;
import Common.UI.Menus_2023.StableMenuItem;
import Common.Utils.Utils;
import org.apache.commons.io.FileUtils;
import javax.swing.*;
import java.io.File;
@@ -39,7 +38,7 @@ public abstract class Properties {
}
public void Update() {
try {
FileUtils.write(getFile(), Utils.jsonToPrettyFormat(Utils.gson.toJson(this)));
Utils.jsonToFile(this, getFile());
} catch (Exception e) {
e.printStackTrace();
}