Kaynağa Gözat

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

master
haofangyuan Eric Zhao 5 yıl önce
ebeveyn
işleme
55838d9fb0
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  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 Dosyayı Görüntüle

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

Yükleniyor…
İptal
Kaydet