wu-sheng commented on a change in pull request #2148: Support service inventory extension fields in json format URL: https://github.com/apache/incubator-skywalking/pull/2148#discussion_r247298369
########## File path: oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/register/ServiceInventory.java ########## @@ -86,6 +90,24 @@ public void setServiceNodeType(NodeType nodeType) { return result; } + public void setProperties(JsonObject properties) { + this.properties = properties; + if (properties != null && properties.keySet().size() > 0) { + this.prop = properties.toString(); + } + } + + private void setProp(String prop) { + this.prop = prop; + if (!Strings.isNullOrEmpty(prop)) { + this.properties = new Gson().fromJson(prop, JsonObject.class); Review comment: Yes. Feel free to send a pull request to move this as static field. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services