复用 Gson 对象
This commit is contained in:
@ -928,10 +928,9 @@ public class MainActivity extends BaseActivity {
|
||||
} else if (entryName.contains("halo_skip.json")) {
|
||||
InputStream in = zipfile.getInputStream(entry);
|
||||
if (in != null) {
|
||||
final Gson gson = new Gson();
|
||||
final BufferedReader reader = new BufferedReader(new InputStreamReader(in));
|
||||
|
||||
InnerMetaInfoEntity info = gson.fromJson(reader, InnerMetaInfoEntity.class);
|
||||
InnerMetaInfoEntity info = GsonUtils.getGson().fromJson(reader, InnerMetaInfoEntity.class);
|
||||
if (info != null) {
|
||||
if (EntranceUtils.HOST_COMMUNITY.equals(info.getType())) {
|
||||
UserManager.getInstance().setCommunityData(new CommunityEntity(info.getLink(), info.getText()));
|
||||
|
||||
Reference in New Issue
Block a user