mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Violette Roche-Montane
29.35.2013 3810917f1eadec818da2bf140869825c79090d7e
Replaced getLoopbackAddress (only supported by 1.7) by getByName(...) in the StaticUtilsTestCase too.
1 files modified
15 ■■■■ changed files
opendj3/opendj-server2x-adapter/src/test/java/org/forgerock/opendj/adapter/server2x/StaticUtilsTestCase.java 15 ●●●● patch | view | raw | blame | history
opendj3/opendj-server2x-adapter/src/test/java/org/forgerock/opendj/adapter/server2x/StaticUtilsTestCase.java
@@ -28,6 +28,7 @@
import static org.fest.assertions.Assertions.assertThat;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.util.LinkedList;
import java.util.List;
@@ -390,7 +391,12 @@
        final PlainSASLBindRequest request =
                Requests.newPlainSASLBindRequest("u:user.0", ("password").toCharArray());
        final String serverName = InetAddress.getLoopbackAddress().getCanonicalHostName();
        String serverName = null;
        try {
            serverName = InetAddress.getByName(null).getCanonicalHostName();
        } catch (UnknownHostException e) {
            // nothing to do.
        }
        final BindClient bindClient = request.createBindClient(serverName);
        final GenericBindRequest genericBindRequest = bindClient.nextBindRequest();
        final org.opends.server.types.ByteString expectedValue =
@@ -410,7 +416,12 @@
        final CRAMMD5SASLBindRequest request =
                Requests.newCRAMMD5SASLBindRequest("u:user.2", ("password").toCharArray());
        final String serverName = InetAddress.getLoopbackAddress().getCanonicalHostName();
        String serverName = null;
        try {
            serverName = InetAddress.getByName(null).getCanonicalHostName();
        } catch (UnknownHostException e) {
            // nothing to do.
        }
        final BindClient bindClient = request.createBindClient(serverName);
        final GenericBindRequest genericBindRequest = bindClient.nextBindRequest();
        final org.opends.server.types.ByteString expectedValue =