From ed1254bfd17a5f3e818a00367a3a30bad24ee133 Mon Sep 17 00:00:00 2001 From: rusefi Date: Fri, 5 Jun 2020 01:26:37 -0400 Subject: [PATCH] TS plugin progress --- .../src/com/rusefi/ui/storage/PersistentConfiguration.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/java_console/inifile/src/com/rusefi/ui/storage/PersistentConfiguration.java b/java_console/inifile/src/com/rusefi/ui/storage/PersistentConfiguration.java index 2dd0aeb5dd..ef8a0603cb 100644 --- a/java_console/inifile/src/com/rusefi/ui/storage/PersistentConfiguration.java +++ b/java_console/inifile/src/com/rusefi/ui/storage/PersistentConfiguration.java @@ -46,7 +46,11 @@ public class PersistentConfiguration { @SuppressWarnings("unchecked") public void load() { try { - XMLDecoder e = new XMLDecoder(new BufferedInputStream(new FileInputStream(CONFIG_FILE_NAME))); + BufferedInputStream inputStream = new BufferedInputStream(new FileInputStream(CONFIG_FILE_NAME)); + /** + * interesting things are happening while this is executed under TS as a plugin so we need non-default CL parameter + */ + XMLDecoder e = new XMLDecoder(inputStream, null, null, PersistentConfiguration.class.getClassLoader()); config = (Map) e.readObject(); e.close(); System.out.println("Console configuration from " + CONFIG_FILE_NAME);