JAL-3322 replaced invokeAndWait(r) with r.run() and fixed nullpointer error in jvl...
authorBen Soares <bsoares@dundee.ac.uk>
Tue, 25 Jun 2019 16:04:12 +0000 (17:04 +0100)
committerBen Soares <bsoares@dundee.ac.uk>
Tue, 25 Jun 2019 16:04:12 +0000 (17:04 +0100)
getdown/lib/getdown-core.jar
getdown/lib/getdown-launcher.jar
getdown/src/getdown/core/src/main/java/com/threerings/getdown/data/Application.java
getdown/src/getdown/launcher/src/main/java/com/threerings/getdown/launcher/Getdown.java
j11lib/getdown-core.jar
j8lib/getdown-core.jar

index 693cc8a..97fecd3 100644 (file)
Binary files a/getdown/lib/getdown-core.jar and b/getdown/lib/getdown-core.jar differ
index ff5273b..941383b 100644 (file)
Binary files a/getdown/lib/getdown-launcher.jar and b/getdown/lib/getdown-launcher.jar differ
index e60e985..c851c24 100644 (file)
@@ -1887,22 +1887,27 @@ public class Application
       
       try {
         Config tmpConfig = null;
+        Map<String, Object> tmpData = new HashMap<>();
         if (_locatorFile.exists()) {
           tmpConfig = Config.parseConfig(_locatorFile,  opts);
+          // appbase is sanitised in HostWhitelist
+          Map<String, Object> tmpConfigData = tmpConfig.getData();
+          if (tmpConfig != null) {
+            for (Map.Entry<String, Object> 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<String, Object> tmpData = new HashMap<>();
-        for (Map.Entry<String, Object> 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) {
index fdf4b15..0af0360 100644 (file)
@@ -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();
       }
       
     }
index 693cc8a..97fecd3 100644 (file)
Binary files a/j11lib/getdown-core.jar and b/j11lib/getdown-core.jar differ
index 693cc8a..97fecd3 100644 (file)
Binary files a/j8lib/getdown-core.jar and b/j8lib/getdown-core.jar differ