diff --git a/src/be/jeffcheasey88/peeratcode/Configuration.java b/src/be/jeffcheasey88/peeratcode/Configuration.java index d29ea5d..1915ed1 100644 --- a/src/be/jeffcheasey88/peeratcode/Configuration.java +++ b/src/be/jeffcheasey88/peeratcode/Configuration.java @@ -30,17 +30,17 @@ public class Configuration { private int groupJoinMinutes; private String groupQuitMinutes; - private File _file; + private File file; public Configuration(String path) { - this._file = new File(path); - System.out.println("Config on " + _file.getAbsolutePath()); + this.file = new File(path); + System.out.println("Config on " + file.getAbsolutePath()); } public void load() throws Exception { - if (!this._file.exists()) + if (!this.file.exists()) return; - BufferedReader reader = new BufferedReader(new FileReader(this._file)); + BufferedReader reader = new BufferedReader(new FileReader(this.file)); String line; while ((line = reader.readLine()) != null) { String[] split = line.split("="); @@ -93,14 +93,14 @@ public class Configuration { } public void save() throws Exception { - if (!_file.exists()) { - File parent = _file.getParentFile(); + if (!file.exists()) { + File parent = file.getParentFile(); if (!parent.exists()) parent.mkdirs(); - _file.createNewFile(); + file.createNewFile(); } Field[] fields = getClass().getDeclaredFields(); - BufferedWriter writer = new BufferedWriter(new FileWriter(_file)); + BufferedWriter writer = new BufferedWriter(new FileWriter(file)); for (Field field : fields) { field.setAccessible(true); if (field.getName().startsWith("_"))