(String host, int port)
| 123 | */ |
| 124 | // A copy of GrpcUtil.authorityFromHostAndPort |
| 125 | private static String authorityFromHostAndPort(String host, int port) { |
| 126 | try { |
| 127 | return new URI(null, null, host, port, null, null, null).getAuthority(); |
| 128 | } catch (URISyntaxException ex) { |
| 129 | throw new IllegalArgumentException("Invalid host or port: " + host + " " + port, ex); |
| 130 | } |
| 131 | } |
| 132 | |
| 133 | /** |
| 134 | * Static factory for creating a new ServerBuilder. |
no test coverage detected