Parcourir la source

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

master
haofangyuan Eric Zhao il y a 5 ans
Parent
révision
55838d9fb0
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  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 Voir le fichier

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

Chargement…
Annuler
Enregistrer