TS plugin progress

This commit is contained in:
rusefi 2020-06-05 01:26:37 -04:00
parent 828bde9797
commit ed1254bfd1
1 changed files with 5 additions and 1 deletions

View File

@ -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<String, Object>) e.readObject();
e.close();
System.out.println("Console configuration from " + CONFIG_FILE_NAME);