瀏覽代碼

dashboard: Fix empty rule pushing bug of FlowRuleZookeeperPublisher sample (#732)

master
haofangyuan Eric Zhao 5 年之前
父節點
當前提交
55838d9fb0
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. +1
    -1
      sentinel-dashboard/src/test/java/com/alibaba/csp/sentinel/dashboard/rule/zookeeper/FlowRuleZookeeperPublisher.java

+ 1
- 1
sentinel-dashboard/src/test/java/com/alibaba/csp/sentinel/dashboard/rule/zookeeper/FlowRuleZookeeperPublisher.java 查看文件

@@ -44,7 +44,7 @@ public class FlowRuleZookeeperPublisher implements DynamicRulePublisher<List<Flo
if (stat == null) {
zkClient.create().creatingParentContainersIfNeeded().withMode(CreateMode.PERSISTENT).forPath(path, null);
}
byte[] data = CollectionUtils.isEmpty(rules) ? "".getBytes() : converter.convert(rules).getBytes();
byte[] data = CollectionUtils.isEmpty(rules) ? "[]".getBytes() : converter.convert(rules).getBytes();
zkClient.setData().forPath(path, data);
}
}

Loading…
取消
儲存