diff --git a/config/src/main/java/com/yahoo/vespa/config/JRTConnectionPool.java b/config/src/main/java/com/yahoo/vespa/config/JRTConnectionPool.java index 2a62d0e1db10..605ccdf6b727 100644 --- a/config/src/main/java/com/yahoo/vespa/config/JRTConnectionPool.java +++ b/config/src/main/java/com/yahoo/vespa/config/JRTConnectionPool.java @@ -22,7 +22,7 @@ * @author Gunnar Gauslaa Bergem * @author hmusum */ -public final class JRTConnectionPool implements ConnectionPool { +public class JRTConnectionPool implements ConnectionPool { private static final Logger log = Logger.getLogger(JRTConnectionPool.class.getName()); @@ -91,15 +91,15 @@ synchronized JRTConnection switchConnection() { return currentConnection = newConnection; } - public synchronized JRTConnection initialize() { + private synchronized JRTConnection initialize() { return pickNewConnectionRandomly(getSources()); } - protected JRTConnection pickNewConnectionRandomly(List sources) { + final protected JRTConnection pickNewConnectionRandomly(List sources) { return sources.get(ThreadLocalRandom.current().nextInt(0, sources.size())); } - public List getSources() { + final public List getSources() { List ret; synchronized (connections) { ret = new ArrayList<>(connections.values());