Skip to content

Commit

Permalink
GuavaCompatibility::getHost(): remove since it's not been used
Browse files Browse the repository at this point in the history
  • Loading branch information
yaronkaikov committed Dec 21, 2023
1 parent 8d8070e commit f0d3e38
Showing 1 changed file with 0 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -189,15 +189,6 @@ public abstract <I, O> ListenableFuture<O> transformAsync(
* HostAndPort.getHost} starting with Guava 20.0; it has been completely removed in Guava 22.0.
*/
@SuppressWarnings("JavaReflectionMemberAccess")
public String getHost(HostAndPort hostAndPort) {
try {
// Guava >= 20.0
return (String) HostAndPort.class.getMethod("getHost").invoke(hostAndPort);
} catch (Exception e) {
// Guava < 22.0
return hostAndPort.getHostText();
}
}

private static GuavaCompatibility selectImplementation() {
if (isGuava_19_0_OrHigher()) {
Expand Down

0 comments on commit f0d3e38

Please sign in to comment.