You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2018/07/16 14:19:49 UTC
[GitHub] kitikousei edited a comment on issue #65: 本地存根和本地伪装无法使用
kitikousei edited a comment on issue #65: 本地存根和本地伪装无法使用
URL: https://github.com/apache/incubator-dubbo/issues/65#issuecomment-332194084
在AbstractRegistry中有一段这样的代码
```java
for (Map.Entry<String, List> entry : result.entrySet()) {
String category = entry.getKey();
List categoryList = entry.getValue();
categoryNotified.put(category, categoryList);
saveProperties(url);
listener.notify(categoryList);
}
```
这里的result内容如下
```
[providers=[empty://192.168.1.137/com.xxx.xxService?application=myconsume&category=providers&default.check=false&default.mock=true&dubbo=2.5.5&interface=com.xxx.xxService&methods=register&pid=27046side=consumer], configurators=[empty://192.168.1.137/com.xxx.xxService?application=myconsume&category=configurators&default.check=false&default.mock=true&dubbo=2.5.5&interface=com.xxx.xxService&methods=register&pid=27046&side=consumer], routers=[empty://192.168.1.137/com.xxx.xxService?application=myconsume&category=routers&default.check=false&default.mock=true&dubbo=2.5.5&interface=com.xxx.xxService&methods=register&pid=27046&side=consumer]]
```
在jdk1.7中第一次循环取的是providers。后面的逻辑会去刷新forbidden字段(refreshInvoker方法)。此时是forbidden设置为true,第二次循环会设置为false,第三次会设置成false。此时可以本地伪装。
但是在jdk1.8中第一次循环去的是configurators。后面的逻辑会去刷新forbidden字段(refreshInvoker方法)。此时是forbidden设置为false,第二次循环会设置为true,第三次会设置成true。此时就本地伪装就没法调用
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org