diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2017-09-06 14:38:25 +0200 |
---|---|---|
committer | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2017-09-13 15:50:50 +0200 |
commit | 0d06d27d3c0f1a35384b40926e34dc0020de998d (patch) | |
tree | 1246636c4acf1d1c5d9c00de23dfada6646f17bd /server/sonar-process | |
parent | 893b3d2f8d5e5d2789cd5c954d8016742bfc18e5 (diff) | |
download | sonarqube-0d06d27d3c0f1a35384b40926e34dc0020de998d.tar.gz sonarqube-0d06d27d3c0f1a35384b40926e34dc0020de998d.zip |
SONAR-9741 make NetworkUtils an interface
to allow unit testing
Diffstat (limited to 'server/sonar-process')
-rw-r--r-- | server/sonar-process/src/main/java/org/sonar/process/ProcessProperties.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/server/sonar-process/src/main/java/org/sonar/process/ProcessProperties.java b/server/sonar-process/src/main/java/org/sonar/process/ProcessProperties.java index 24b9be0885f..a0eb3bd6ea7 100644 --- a/server/sonar-process/src/main/java/org/sonar/process/ProcessProperties.java +++ b/server/sonar-process/src/main/java/org/sonar/process/ProcessProperties.java @@ -96,7 +96,7 @@ public class ProcessProperties { if ("0".equals(port)) { String address = props.nonNullValue(addressPropertyKey); try { - props.set(portPropertyKey, String.valueOf(NetworkUtils.getNextAvailablePort(InetAddress.getByName(address)))); + props.set(portPropertyKey, String.valueOf(NetworkUtils.INSTANCE.getNextAvailablePort(InetAddress.getByName(address)))); } catch (UnknownHostException e) { throw new IllegalStateException("Cannot resolve address [" + address + "] set by property [" + addressPropertyKey + "]", e); } |