import static com.google.common.base.Preconditions.checkNotNull;
-public class NetconfConfigUtil {
+public final class NetconfConfigUtil {
private static final Logger logger = LoggerFactory.getLogger(NetconfConfigUtil.class);
private static final String PREFIX_PROP = "netconf.";
-
+ private NetconfConfigUtil() {}
private enum InfixProp {
tcp, ssh
Optional<InetSocketAddress> inetSocketAddressOptional = extractSomeNetconfAddress(context, InfixProp.tcp, exceptionMessageIfNotFound, forClient);
- if (inetSocketAddressOptional.isPresent() == false) {
+ if (!inetSocketAddressOptional.isPresent()) {
throw new IllegalStateException("Netconf tcp address not found." + exceptionMessageIfNotFound);
}
InetSocketAddress inetSocketAddress = inetSocketAddressOptional.get();