From d09f85b1e871b28f413c01579556cb1a9862249e Mon Sep 17 00:00:00 2001 From: rusEfi Date: Tue, 27 Jan 2015 08:04:17 -0600 Subject: [PATCH] auto-sync --- .../src/com/rusefi/ui/storage/PersistentConfiguration.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/java_console/ui/src/com/rusefi/ui/storage/PersistentConfiguration.java b/java_console/ui/src/com/rusefi/ui/storage/PersistentConfiguration.java index 373eaa5e83..d1ddd72180 100644 --- a/java_console/ui/src/com/rusefi/ui/storage/PersistentConfiguration.java +++ b/java_console/ui/src/com/rusefi/ui/storage/PersistentConfiguration.java @@ -2,7 +2,6 @@ package com.rusefi.ui.storage; import com.irnems.FileLog; -import javax.swing.*; import java.beans.XMLDecoder; import java.beans.XMLEncoder; import java.io.*; @@ -19,6 +18,7 @@ public class PersistentConfiguration { return INSTANCE; } + @SuppressWarnings("unchecked") public void load() { try { XMLDecoder e = new XMLDecoder(new BufferedInputStream(new FileInputStream(CONFIG_FILE_NAME))); @@ -30,9 +30,8 @@ public class PersistentConfiguration { } public void save() { - XMLEncoder e = null; try { - e = new XMLEncoder(new BufferedOutputStream(new FileOutputStream(CONFIG_FILE_NAME))); + XMLEncoder e = new XMLEncoder(new BufferedOutputStream(new FileOutputStream(CONFIG_FILE_NAME))); e.writeObject(config); e.close(); System.out.println("Saved to " + CONFIG_FILE_NAME);