mirror of
https://gitee.com/replugin/RePlugin.git
synced 2024-12-02 11:48:02 +08:00
PluginDesc: Determine in != null first
This commit is contained in:
parent
25c65c80f6
commit
628158c1d8
@ -158,9 +158,11 @@ public class PluginDesc {
|
||||
in = null;
|
||||
try {
|
||||
in = RePlugin.getConfig().getCallbacks().openLatestFile(context, "plugins-list.json");
|
||||
String str = IOUtils.toString(in, Charsets.UTF_8);
|
||||
return new JSONArray(str);
|
||||
} catch (Throwable e) {
|
||||
if (in != null) {
|
||||
String str = IOUtils.toString(in, Charsets.UTF_8);
|
||||
return new JSONArray(str);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
if (DEBUG) {
|
||||
Log.e(TAG, e.getMessage(), e);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user