Explorar el Código

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

master
haofangyuan Eric Zhao hace 5 años
padre
commit
55838d9fb0
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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 Ver fichero

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

Cargando…
Cancelar
Guardar