From 2af2f20c35b324fc5f9a5bced333cbdaa64cbe96 Mon Sep 17 00:00:00 2001 From: Belen Pruvost Date: Thu, 16 Sep 2021 09:53:08 +0200 Subject: [NO-JIRA] Addressing some code smells --- .../main/java/org/sonar/application/config/ClusterSettings.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'server/sonar-main/src') diff --git a/server/sonar-main/src/main/java/org/sonar/application/config/ClusterSettings.java b/server/sonar-main/src/main/java/org/sonar/application/config/ClusterSettings.java index 140a0f6944a..aef62f21922 100644 --- a/server/sonar-main/src/main/java/org/sonar/application/config/ClusterSettings.java +++ b/server/sonar-main/src/main/java/org/sonar/application/config/ClusterSettings.java @@ -136,13 +136,13 @@ public class ClusterSettings implements Consumer { } private Set parseAndCheckHosts(Property property, String value) { - Set res = parseHosts( value); + Set res = parseHosts(value); checkValidHosts(property, res); return res; } private void checkValidHosts(Property property, Set addressAndPorts) { - List invalidHosts = addressAndPorts.stream() + List invalidHosts = addressAndPorts.stream() .map(AddressAndPort::getHost) .filter(t -> !network.toInetAddress(t).isPresent()) .sorted() @@ -231,7 +231,9 @@ public class ClusterSettings implements Consumer { private static class AddressAndPort { private static final int NO_PORT = -1; - /** the host from setting, can be a hostname or an IP address */ + /** + * the host from setting, can be a hostname or an IP address + */ private final String host; private final int port; -- cgit v1.2.3