Github user bhlx3lyx7 commented on a diff in the pull request:

    https://github.com/apache/incubator-griffin/pull/389#discussion_r209128145
  
    --- Diff: 
service/src/main/java/org/apache/griffin/core/measure/entity/Measure.java ---
    @@ -104,6 +129,26 @@ public void setDeleted(boolean deleted) {
             this.deleted = deleted;
         }
     
    +    @PrePersist
    +    @PreUpdate
    +    public void save() throws JsonProcessingException {
    +        if (sinksList != null) {
    +            this.sinks = JsonUtil.toJson(sinksList);
    +        } else {
    +            this.sinks = null;
    +        }
    +    }
    +
    +    @PostLoad
    +    public void load() throws IOException {
    +        if (!StringUtils.isEmpty(sinks)) {
    +            this.sinksList = JsonUtil.toEntity(sinks, new 
TypeReference<List<Map<String, Object>>>() {
    --- End diff --
    
    sinksList should be a `List<string>`, why is it `List<Map<String, Object>>` 
here?


---

Reply via email to