Don’t use Java 7 API in EmbeddedMongoAutoConfiguration

Closes gh-4630
pull/4684/head
Andy Wilkinson 9 years ago
parent c58ebae419
commit 91674b2c94

@ -157,7 +157,9 @@ public class EmbeddedMongoAutoConfiguration {
private InetAddress getHost() throws UnknownHostException {
if (this.properties.getHost() == null) {
return InetAddress.getLoopbackAddress();
return InetAddress.getByAddress(Network.localhostIsIPv6()
? new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 }
: new byte[] { 127, 0, 0, 1 });
}
return InetAddress.getByName(this.properties.getHost());
}

Loading…
Cancel
Save