You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "AlbumenJ (via GitHub)" <gi...@apache.org> on 2023/05/21 07:56:52 UTC

[GitHub] [dubbo] AlbumenJ commented on a diff in pull request #12361: fail fast when protocol exp

AlbumenJ commented on code in PR #12361:
URL: https://github.com/apache/dubbo/pull/12361#discussion_r1199716407


##########
dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/RegistryDirectory.java:
##########
@@ -447,6 +448,12 @@ private boolean checkProtocolValid(String queryProtocols, URL providerUrl) {
                 if (providerUrl.getProtocol().equals(acceptProtocol)) {
                     accept = true;
                     break;
+                } else {
+                    try {
+                        moduleModel.getApplicationModel().getExtensionLoader(Protocol.class).getExtension(acceptProtocol);

Review Comment:
   Use `hasExtension` would be better



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org