提交 f9fb6933 编写于 作者: Y Yann.Xia 提交者: Jared Tan

Fix unessential gson instance (#2151)

上级 43b216aa
......@@ -48,6 +48,7 @@ public class ServiceInventory extends RegisterSource {
public static final String MAPPING_SERVICE_ID = "mapping_service_id";
public static final String MAPPING_LAST_UPDATE_TIME = "mapping_last_update_time";
public static final String PROPERTIES = "properties";
private static final Gson GSON = new Gson();
@Setter @Getter @Column(columnName = NAME, matchQuery = true) private String name = Const.EMPTY_STRING;
@Setter @Getter @Column(columnName = IS_ADDRESS) private int isAddress;
......@@ -100,7 +101,7 @@ public class ServiceInventory extends RegisterSource {
private void setProp(String prop) {
this.prop = prop;
if (!Strings.isNullOrEmpty(prop)) {
this.properties = new Gson().fromJson(prop, JsonObject.class);
this.properties = GSON.fromJson(prop, JsonObject.class);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册