Fix getUrl NPE after setInvokers (#10738)

This commit is contained in:
Albumen Kevin 2022-10-13 10:07:12 +08:00 committed by GitHub
parent ff6d8a586c
commit 898d2996bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -186,6 +186,9 @@ public class RpcServiceContext extends RpcContext {
@Override
public void setUrls(List<URL> urls) {
this.urls = urls;
if (!urls.isEmpty()) {
this.url = urls.get(0);
}
}
@Override