fix: config check and restore
This commit is contained in:
@@ -215,12 +215,7 @@ public class Config {
|
|||||||
cur = new JSONObject();
|
cur = new JSONObject();
|
||||||
}
|
}
|
||||||
|
|
||||||
JSONArray names = json.names();
|
for(String key : json.keySet()) {
|
||||||
int len = names.length();
|
|
||||||
|
|
||||||
for (int i = 0; i < len; i++) {
|
|
||||||
String key = names.optString(i);
|
|
||||||
if (key != null) {
|
|
||||||
Object defVal = json.opt(key);
|
Object defVal = json.opt(key);
|
||||||
Object curVal = cur.opt(key);
|
Object curVal = cur.opt(key);
|
||||||
if (defVal != null) {
|
if (defVal != null) {
|
||||||
@@ -237,7 +232,6 @@ public class Config {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return cur;
|
return cur;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user