Skip to content

Commit aabcbc3

Browse files
cuteasonchickenlj
authored andcommitted
Merge pull request from #775 from hollyshi:patch-2
The operator '+' has a higher operation priority than '?:'. A NPE will be thrown if getUrl() returns null, which is not expected.
1 parent 933caca commit aabcbc3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dubbo-rpc/dubbo-rpc-api/src/main/java/com/alibaba/dubbo/rpc/listener/ListenerInvokerWrapper.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public Result invoke(Invocation invocation) throws RpcException {
7676

7777
@Override
7878
public String toString() {
79-
return getInterface() + " -> " + getUrl() == null ? " " : getUrl().toString();
79+
return getInterface() + " -> " + (getUrl() == null ? " " : getUrl().toString());
8080
}
8181

8282
public void destroy() {
@@ -97,4 +97,4 @@ public void destroy() {
9797
}
9898
}
9999

100-
}
100+
}

0 commit comments

Comments
 (0)