()
| 186 | } |
| 187 | |
| 188 | public List<InetAddress> getIps() { |
| 189 | try { |
| 190 | |
| 191 | if (specifiedByHostName) { |
| 192 | |
| 193 | List<InetAddress> ips = Arrays.asList(PrivateDNSClient.getAllByName(ip)); |
| 194 | return ips; |
| 195 | } else { |
| 196 | |
| 197 | List<InetAddress> ips = new ArrayList<InetAddress>(); |
| 198 | ips.add(InetAddress.getByName(ip)); |
| 199 | return ips; |
| 200 | } |
| 201 | } catch (UnknownHostException e) { |
| 202 | |
| 203 | err("Nonexistent server '%s' is specified in config [DNS resolv error]", ip); |
| 204 | return new ArrayList<InetAddress>(); |
| 205 | } catch (Exception e) { |
| 206 | |
| 207 | // TODO Auto-generated catch block |
| 208 | errWithStackTrace(e); |
| 209 | return new ArrayList<InetAddress>(); |
| 210 | } |
| 211 | } |
| 212 | } |
no test coverage detected