You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by rm...@apache.org on 2014/12/01 10:16:28 UTC

tomee git commit: reverting getNextAvailablePort hack to keep existing default

Repository: tomee
Updated Branches:
  refs/heads/tomee-1.7.x 45567016d -> 093792770


reverting getNextAvailablePort hack to keep existing default


Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/09379277
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/09379277
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/09379277

Branch: refs/heads/tomee-1.7.x
Commit: 093792770d638ca2c23c3b8b620324ed6208e27e
Parents: 4556701
Author: Romain Manni-Bucau <rm...@apache.org>
Authored: Mon Dec 1 10:16:20 2014 +0100
Committer: Romain Manni-Bucau <rm...@apache.org>
Committed: Mon Dec 1 10:16:20 2014 +0100

----------------------------------------------------------------------
 .../src/main/java/org/apache/openejb/util/NetworkUtil.java        | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/09379277/container/openejb-core/src/main/java/org/apache/openejb/util/NetworkUtil.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/util/NetworkUtil.java b/container/openejb-core/src/main/java/org/apache/openejb/util/NetworkUtil.java
index 73bd327..d467294 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/util/NetworkUtil.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/util/NetworkUtil.java
@@ -42,6 +42,7 @@ public final class NetworkUtil {
      * Lock file property name
      */
     public static final String TOMEE_LOCK_FILE = "TOMEE_LOCK_FILE";
+    public static final int[] RANDOM = new int[] { 0 };
 
     private static final ReentrantLock lock = new ReentrantLock();
     private static final Set<LastPort> lastPort = new HashSet<LastPort>();
@@ -63,7 +64,7 @@ public final class NetworkUtil {
         final ReentrantLock l = lock;
         l.lock();
         try {
-            return getNextAvailablePort(PORT_MIN, PORT_MAX, null);
+            return getNextAvailablePort(RANDOM);
         } finally {
             l.unlock();
         }