Skip to content

Commit

Permalink
Merge pull request #3 from wangchangbing/master
Browse files Browse the repository at this point in the history
admin项目订阅zk时当interface包含内部类$字符时出现问题
  • Loading branch information
oldratlee committed Feb 28, 2013
2 parents 935fe30 + 9552833 commit a4140d2
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ protected void doSubscribe(final URL url, final NotifyListener listener) {
listeners.putIfAbsent(listener, new ChildListener() {
public void childChanged(String parentPath, List<String> currentChilds) {
for (String child : currentChilds) {
child = URL.decode(child);
if (! anyServices.contains(child)) {
anyServices.add(child);
subscribe(url.setPath(child).addParameters(Constants.INTERFACE_KEY, child,
Expand All @@ -138,8 +139,9 @@ public void childChanged(String parentPath, List<String> currentChilds) {
zkClient.create(root, false);
List<String> services = zkClient.addChildListener(root, zkListener);
if (services != null && services.size() > 0) {
anyServices.addAll(services);
for (String service : services) {
service = URL.decode(service);
anyServices.add(service);
subscribe(url.setPath(service).addParameters(Constants.INTERFACE_KEY, service,
Constants.CHECK_KEY, String.valueOf(false)), listener);
}
Expand Down

0 comments on commit a4140d2

Please sign in to comment.