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) {
}
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();
}
}