Reformatted

This commit is contained in:
7u83 2018-12-04 15:31:34 +01:00
parent 6bb6d88371
commit 03fbd9cd25
1 changed files with 18 additions and 18 deletions

View File

@ -219,8 +219,9 @@ public class Globals {
asset_types.add(a);
});
if (!sort)
if (!sort) {
return asset_types;
}
asset_types.sort(new Comparator<Class<AbstractAsset>>() {
@Override
@ -260,6 +261,9 @@ public class Globals {
Collection<Class> lafs;
// lafs = opensesim.util.XClassLoader.getClassesList(urllist, LookAndFeel.class);
lafs = class_cache.getClassCollection(LookAndFeel.class);
if (lafs == null) {
return;
}
ClassLoader currentThreadClassLoader
= Thread.currentThread().getContextClassLoader();
@ -299,8 +303,7 @@ public class Globals {
prefs = Preferences.userNodeForPackage(c);
// world = new World();
// world = new World();
// initialize urllist used by class loader
updateUrlList();
@ -342,15 +345,16 @@ public class Globals {
return new JSONObject(assets_json);
}
static public final void putAssets(JSONObject assets){
static public final void putAssets(JSONObject assets) {
prefs.put(PrefKeys.ASSETS, assets.toString());
}
static public final JSONObject getExchanges(){
static public final JSONObject getExchanges() {
String json = prefs.get(PrefKeys.EXCHANGES, "{}");
return new JSONObject(json);
}
static public final void putExchanges(JSONObject e){
static public final void putExchanges(JSONObject e) {
prefs.put(PrefKeys.EXCHANGES, e.toString());
}
@ -361,8 +365,6 @@ public class Globals {
return traders;
}
static public final JSONObject getStrategies() {
String cfglist = Globals.prefs.get(PrefKeys.STRATEGIES, "{}");
JSONObject cfgs = new JSONObject(cfglist);
@ -445,7 +447,6 @@ public class Globals {
}
public static void clearAll() {
putStrategies(new JSONObject());
putTraders(new JSONArray());
@ -461,8 +462,7 @@ public class Globals {
}
public static JSONObject getWorld(){
public static JSONObject getWorld() {
JSONObject cfg = new JSONObject();
cfg.put(World.JKEYS.ASSETS, getAssets());
cfg.put(World.JKEYS.EXCHANGES, getExchanges());