MCPcopy Create free account
hub / github.com/DeNA/PacketProxy / getIps

Method getIps

src/main/java/core/packetproxy/model/Server.java:188–211  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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}

Callers 1

queryByAddressMethod · 0.80

Calls 5

getAllByNameMethod · 0.95
errMethod · 0.80
errWithStackTraceMethod · 0.80
addMethod · 0.45
getByNameMethod · 0.45

Tested by

no test coverage detected