Skip to content

Commit

Permalink
CamlCase
Browse files Browse the repository at this point in the history
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
  • Loading branch information
holgerfriedrich committed Dec 17, 2023
1 parent a1b2269 commit da9b908
Showing 1 changed file with 14 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ public class IpAddonFinder extends BaseAddonFinder {
public static final String SERVICE_TYPE = SERVICE_TYPE_IP;
public static final String SERVICE_NAME = SERVICE_NAME_IP;

private static final String TYPE_IP_MULTICAST = "IpMulticast";
private static final String MATCH_PROPERTY_RESPONSE = "Response";
private static final String PARAMETER_DEST_IP = "DestIp";
private static final String PARAMETER_DEST_PORT = "DestPort";
private static final String PARAMETER_REQUEST = "Request";
private static final String PARAMETER_SRC_IP = "SrcIp";
private static final String PARAMETER_SRC_PORT = "SrcPort";
private static final String PARAMETER_TIMEOUT_MS = "TimeoutMs";
private static final String TYPE_IP_MULTICAST = "ipMulticast";
private static final String MATCH_PROPERTY_RESPONSE = "response";
private static final String PARAMETER_DEST_IP = "destIp";
private static final String PARAMETER_DEST_PORT = "destPort";
private static final String PARAMETER_REQUEST = "request";
private static final String PARAMETER_SRC_IP = "srcIp";
private static final String PARAMETER_SRC_PORT = "srcPort";
private static final String PARAMETER_TIMEOUT_MS = "timeoutMs";

private final Logger logger = LoggerFactory.getLogger(IpAddonFinder.class);
private final ScheduledExecutorService scheduler = ThreadPoolManager.getScheduledPool(SERVICE_NAME);
Expand Down Expand Up @@ -144,22 +144,25 @@ void scan() {
try {
timeoutMs = Integer.parseInt(Objects.toString(parameters.get(PARAMETER_TIMEOUT_MS)));
} catch (NumberFormatException e) {
logger.info("{}: discovery-parameter " + PARAMETER_TIMEOUT_MS + "cannot be parsed", candidate.getUID());
logger.info("{}: discovery-parameter " + PARAMETER_TIMEOUT_MS + "cannot be parsed",
candidate.getUID());
continue;
}
@Nullable
InetAddress destIp = null;
try {
destIp = InetAddress.getByName(parameters.get(PARAMETER_DEST_IP));
} catch (UnknownHostException e) {
logger.info("{}: discovery-parameter " + PARAMETER_DEST_IP + " cannot be parsed", candidate.getUID());
logger.info("{}: discovery-parameter " + PARAMETER_DEST_IP + " cannot be parsed",
candidate.getUID());
continue;
}
int destPort = 0;
try {
destPort = Integer.parseInt(Objects.toString(parameters.get(PARAMETER_DEST_PORT)));
} catch (NumberFormatException e) {
logger.info("{}: discovery-parameter " + PARAMETER_DEST_PORT + " cannot be parsed", candidate.getUID());
logger.info("{}: discovery-parameter " + PARAMETER_DEST_PORT + " cannot be parsed",
candidate.getUID());
continue;
}

Expand Down

0 comments on commit da9b908

Please sign in to comment.