From a94cb8c8073c31b911020e8565bbd4bd60b37bad Mon Sep 17 00:00:00 2001
From: Matthew Swift <matthew.swift@forgerock.com>
Date: Tue, 24 May 2011 16:34:03 +0000
Subject: [PATCH] Fix OPENDJ-40: Upgrade to latest Grizzly

---
 opendj3/opendj-ldap-sdk/src/test/java/org/forgerock/opendj/ldap/TestCaseUtils.java |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/opendj3/opendj-ldap-sdk/src/test/java/org/forgerock/opendj/ldap/TestCaseUtils.java b/opendj3/opendj-ldap-sdk/src/test/java/org/forgerock/opendj/ldap/TestCaseUtils.java
index 243ede9..6a6b487 100644
--- a/opendj3/opendj-ldap-sdk/src/test/java/org/forgerock/opendj/ldap/TestCaseUtils.java
+++ b/opendj3/opendj-ldap-sdk/src/test/java/org/forgerock/opendj/ldap/TestCaseUtils.java
@@ -51,13 +51,13 @@
    * property when running the server if you want to use a given port number,
    * otherwise a port is chosen randomly at test startup time.
    */
-  public static final String PROPERTY_LDAP_PORT = "org.opendj.server.LdapPort";
+  public static final String PROPERTY_LDAP_PORT = "org.forgerock.opendj.test.LdapPort";
 
   /**
    * Port number that's used by the server. Need to be used by the test cases to
    * create connections.
    */
-  public static int port;
+  public static final int port;
 
   static
   {
@@ -109,20 +109,19 @@
    */
   public static int findFreePort()
   {
-    int port;
     try
     {
       ServerSocket serverLdapSocket = new ServerSocket();
       serverLdapSocket.setReuseAddress(true);
       serverLdapSocket.bind(new InetSocketAddress("127.0.0.1", 0));
-      port = serverLdapSocket.getLocalPort();
+      final int port = serverLdapSocket.getLocalPort();
       serverLdapSocket.close();
+      return port;
     }
     catch (IOException e)
     {
       throw new RuntimeException(e);
     }
-    return port;
   }
 
 

--
Gitblit v1.10.0