From: Ben Soares Date: Tue, 25 Jun 2019 16:04:12 +0000 (+0100) Subject: JAL-3322 replaced invokeAndWait(r) with r.run() and fixed nullpointer error in jvl... X-Git-Tag: Release_2_11_0~3^2~1^2~3 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=04a290ef6c2b17a733c045c5db22393846fd45c2;p=jalview.git JAL-3322 replaced invokeAndWait(r) with r.run() and fixed nullpointer error in jvl config reading --- diff --git a/getdown/lib/getdown-core.jar b/getdown/lib/getdown-core.jar index 693cc8a..97fecd3 100644 Binary files a/getdown/lib/getdown-core.jar and b/getdown/lib/getdown-core.jar differ diff --git a/getdown/lib/getdown-launcher.jar b/getdown/lib/getdown-launcher.jar index ff5273b..941383b 100644 Binary files a/getdown/lib/getdown-launcher.jar and b/getdown/lib/getdown-launcher.jar differ diff --git a/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/Application.java b/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/Application.java index e60e985..c851c24 100644 --- a/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/Application.java +++ b/getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/Application.java @@ -1887,22 +1887,27 @@ public class Application try { Config tmpConfig = null; + Map tmpData = new HashMap<>(); if (_locatorFile.exists()) { tmpConfig = Config.parseConfig(_locatorFile, opts); + // appbase is sanitised in HostWhitelist + Map tmpConfigData = tmpConfig.getData(); + if (tmpConfig != null) { + for (Map.Entry entry : tmpConfigData.entrySet()) { + String key = entry.getKey(); + Object value = entry.getValue(); + String mkey = key.indexOf('.') > -1 ? key.substring(key.indexOf('.') + 1) : key; + if (Config.allowedReplaceKeys.contains(mkey) || Config.allowedMergeKeys.contains(mkey)) { + tmpData.put(key, value); + } + } + } else { + log.warning("Error occurred reading config file", "file", _locatorFile); + } } else { log.warning("Given locator file does not exist", "file", _locatorFile); } - // appbase is sanitised in HostWhitelist - Map tmpData = new HashMap<>(); - for (Map.Entry entry : tmpConfig.getData().entrySet()) { - String key = entry.getKey(); - Object value = entry.getValue(); - String mkey = key.indexOf('.') > -1 ? key.substring(key.indexOf('.') + 1) : key; - if (Config.allowedReplaceKeys.contains(mkey) || Config.allowedMergeKeys.contains(mkey)) { - tmpData.put(key, value); - } - } locatorConfig = new Config(tmpData); } catch (Exception e) { diff --git a/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/Getdown.java b/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/Getdown.java index fdf4b15..0af0360 100644 --- a/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/Getdown.java +++ b/getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/Getdown.java @@ -1116,13 +1116,15 @@ public abstract class Getdown extends Thread } if (! (_ifc == null) && _ifc.progressSync) { try { - EventQueue.invokeAndWait(r); + //EventQueue.invokeAndWait(r); + r.run(); } catch (Exception e) { log.warning("Tried to invokeAndWait but couldn't. Going to invokeLater instead", "Exception", e.getMessage()); EventQueue.invokeLater(r); } } else { - EventQueue.invokeLater(r); + //EventQueue.invokeLater(r); + r.run(); } } diff --git a/j11lib/getdown-core.jar b/j11lib/getdown-core.jar index 693cc8a..97fecd3 100644 Binary files a/j11lib/getdown-core.jar and b/j11lib/getdown-core.jar differ diff --git a/j8lib/getdown-core.jar b/j8lib/getdown-core.jar index 693cc8a..97fecd3 100644 Binary files a/j8lib/getdown-core.jar and b/j8lib/getdown-core.jar differ