Skip to content

Commit

Permalink
Merge pull request from #775 from hollyshi:patch-2
Browse files Browse the repository at this point in the history
The operator '+' has a higher operation priority than '?:'. A NPE will be thrown if getUrl() returns null, which is not expected.
  • Loading branch information
cuteason authored and chickenlj committed Oct 26, 2017
1 parent 933caca commit aabcbc3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public Result invoke(Invocation invocation) throws RpcException {

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

public void destroy() {
Expand All @@ -97,4 +97,4 @@ public void destroy() {
}
}

}
}

0 comments on commit aabcbc3

Please sign in to comment.