Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mock功能不能正常使用的问题 #148

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
tt
  • Loading branch information
牛魔王_余威 committed Jun 17, 2016
commit c67579a8b2284617772a2d3d6f31710f718768b6
Original file line number Diff line number Diff line change
Expand Up @@ -575,9 +575,13 @@ private void destroyUnusedInvokers(Map<String, Invoker<T>> oldUrlInvokerMap, Map
}

public List<Invoker<T>> doList(Invocation invocation) {
if (forbidden) {
String attachment = invocation.getAttachment("invocation.need.mock");
if (Boolean.TRUE.toString().equals(attachment)) {
logger.info("Don't throw RpcException when mock invocation occurs.");
} else if (forbidden) {
throw new RpcException(RpcException.FORBIDDEN_EXCEPTION, "Forbid consumer " + NetUtils.getLocalHost() + " access service " + getInterface().getName() + " from registry " + getUrl().getAddress() + " use dubbo version " + Version.getVersion() + ", Please check registry access list (whitelist/blacklist).");
}

List<Invoker<T>> invokers = null;
Map<String, List<Invoker<T>>> localMethodInvokerMap = this.methodInvokerMap; // local reference
if (localMethodInvokerMap != null && localMethodInvokerMap.size() > 0) {
Expand Down