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

This commit is contained in:
haofangyuan 2019-05-05 15:08:07 +08:00 committed by Eric Zhao
parent 1d1878c1dd
commit 55838d9fb0
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}
}