Skip to content
Snippets Groups Projects
Unverified Commit d8c09ab9 authored by 陈健斌's avatar 陈健斌 Committed by GitHub
Browse files

bugfix: zk node path is converted to dataId error (#3635)

parent d724cdae
No related branches found
No related tags found
No related merge requests found
......@@ -348,15 +348,16 @@ public class ZookeeperConfiguration extends AbstractConfiguration {
return;
}
ConfigurationChangeEvent event = new ConfigurationChangeEvent().setDataId(s).setNewValue(o.toString())
.setChangeType(ConfigurationChangeType.MODIFY);
String dataId = s.replaceFirst(ROOT_PATH + ZK_PATH_SPLIT_CHAR, "");
ConfigurationChangeEvent event = new ConfigurationChangeEvent().setDataId(dataId).setNewValue(o.toString())
.setChangeType(ConfigurationChangeType.MODIFY);
listener.onProcessEvent(event);
}
@Override
public void handleDataDeleted(String s) {
ConfigurationChangeEvent event = new ConfigurationChangeEvent().setDataId(s).setChangeType(
String dataId = s.replaceFirst(ROOT_PATH + ZK_PATH_SPLIT_CHAR, "");
ConfigurationChangeEvent event = new ConfigurationChangeEvent().setDataId(dataId).setChangeType(
ConfigurationChangeType.DELETE);
listener.onProcessEvent(event);
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment