MCPcopy Create free account
hub / github.com/M66B/FairEmail / getHostAddress

Method getHostAddress

app/src/main/java/javax/mail/URLName.java:496–508  ·  view source on GitHub ↗

Get the IP address of our host. Look up the name the first time and remember that we've done so, whether the lookup fails or not.

()

Source from the content-addressed store, hash-verified

494 * so, whether the lookup fails or not.
495 */
496 private synchronized InetAddress getHostAddress() {
497 if (hostAddressKnown)
498 return hostAddress;
499 if (host == null)
500 return null;
501 try {
502 hostAddress = InetAddress.getByName(host);
503 } catch (UnknownHostException ex) {
504 hostAddress = null;
505 }
506 hostAddressKnown = true;
507 return hostAddress;
508 }
509
510 /**
511 * The class contains a utility method for converting a

Callers 12

equalsMethod · 0.95
hashCodeMethod · 0.95
connectMethod · 0.80
_connectMethod · 0.80
_getDnsServersMethod · 0.80
DnsRecordMethod · 0.80
getOrganizationMethod · 0.80
isJunkMethod · 0.80
getLocalHostMethod · 0.80
getLocalHostMethod · 0.80
getLocalHostMethod · 0.80
getLocalHostNameMethod · 0.80

Calls 1

getByNameMethod · 0.80

Tested by

no test coverage detected