Skip to content

Commit

Permalink
Don’t use Java 7 API in EmbeddedMongoAutoConfiguration
Browse files Browse the repository at this point in the history
  • Loading branch information
wilkinsona committed Dec 4, 2015
1 parent c58ebae commit 91674b2
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ private int getPort() {

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());
}
Expand Down

0 comments on commit 91674b2

Please sign in to comment.