Skip to content

Commit

Permalink
use hasExtension
Browse files Browse the repository at this point in the history
  • Loading branch information
wxbty committed May 21, 2023
1 parent 3a7d20c commit ee5bd10
Showing 1 changed file with 2 additions and 4 deletions.
Expand Up @@ -449,10 +449,8 @@ private boolean checkProtocolValid(String queryProtocols, URL providerUrl) {
accept = true;
break;
} else {
try {
moduleModel.getApplicationModel().getExtensionLoader(Protocol.class).getExtension(acceptProtocol);
} catch (IllegalStateException e) {
throw new SkipFailbackWrapperException(e);
if (!moduleModel.getApplicationModel().getExtensionLoader(Protocol.class).hasExtension(acceptProtocol)) {
throw new SkipFailbackWrapperException(new IllegalStateException("No such extension org.apache.dubbo.rpc.Protocol by name " + acceptProtocol + ", please check whether related SPI module is missing"));
}
}
}
Expand Down

0 comments on commit ee5bd10

Please sign in to comment.