[ 
https://issues.apache.org/jira/browse/EAGLE-723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15643263#comment-15643263
 ] 

ASF GitHub Bot commented on EAGLE-723:
--------------------------------------

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

    https://github.com/apache/incubator-eagle/pull/609#discussion_r86718380
  
    --- Diff: 
eagle-core/eagle-alert-parent/eagle-alert/alert-common/src/main/java/org/apache/eagle/alert/config/ConfigBusConsumer.java
 ---
    @@ -54,7 +54,12 @@ public ConfigBusConsumer(ZKConfig config, String topic, 
ConfigChangeCallback cal
     
         public ConfigValue getConfigValue() throws Exception {
             byte[] value = curator.getData().forPath(zkPath);
    -        ConfigValue v = mapper.readValue(value, ConfigValue.class);
    +        ConfigValue v;
    +        try {
    +            v = mapper.readValue(value, ConfigValue.class);
    +        } catch (JsonParseException e) {
    +            v = new ConfigValue();
    --- End diff --
    
    OK


> Add unit test for configbus
> ---------------------------
>
>                 Key: EAGLE-723
>                 URL: https://issues.apache.org/jira/browse/EAGLE-723
>             Project: Eagle
>          Issue Type: Sub-task
>            Reporter: JiJun Tang
>            Assignee: JiJun Tang
>            Priority: Minor
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to