test_class.file: clients/src/test/java/org/apache/kafka/clients/ClientUtilsTest.java
test_class.identifier: ClientUtilsTest
test_case.body: @Test
      public void testParseAndValidateAddresses() {
          check("127.0.0.1:8000");
          check("mydomain.com:8080");
          check("[::1]:8000");
          check("[2001:db8:85a3:8d3:1319:8a2e:370:7348]:1234", "mydomain.com:10000");
          List<InetSocketAddress> validatedAddresses = check("some.invalid.hostname.foo.bar:9999", "mydomain.com:10000");
          assertEquals(1, validatedAddresses.size());
          InetSocketAddress onlyAddress = validatedAddresses.get(0);
          assertEquals("mydomain.com", onlyAddress.getHostName());
          assertEquals(10000, onlyAddress.getPort());
      }
test_case.class_method_signature: ClientUtilsTest.testParseAndValidateAddresses()
test_case.full_signature: @Test public void testParseAndValidateAddresses()
test_case.identifier: testParseAndValidateAddresses
test_case.invocations: check check check check check assertEquals size get assertEquals getHostName assertEquals getPort
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testParseAndValidateAddresses()
focal_class.declarator: log = LoggerFactory.getLogger(ClientUtils.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger log = LoggerFactory.getLogger(ClientUtils.class);
focal_class.type: Logger
focal_class.var_name: log
focal_class.file: clients/src/main/java/org/apache/kafka/clients/ClientUtils.java
focal_class.identifier: ClientUtils
focal_class.class_method_signature: ClientUtils.parseAndValidateAddresses(List<String> urls)
focal_class.full_signature: public static List<InetSocketAddress> parseAndValidateAddresses(List<String> urls)
focal_class.identifier: parseAndValidateAddresses
focal_class.modifiers: public static
focal_class.parameters: (List<String> urls)
focal_class.return: List<InetSocketAddress>
focal_class.signature: List<InetSocketAddress> parseAndValidateAddresses(List<String> urls)
focal_class.class_method_signature: ClientUtils.closeQuietly(Closeable c, String name, AtomicReference<Throwable> firstException)
focal_class.full_signature: public static void closeQuietly(Closeable c, String name, AtomicReference<Throwable> firstException)
focal_class.identifier: closeQuietly
focal_class.modifiers: public static
focal_class.parameters: (Closeable c, String name, AtomicReference<Throwable> firstException)
focal_class.return: void
focal_class.signature: void closeQuietly(Closeable c, String name, AtomicReference<Throwable> firstException)
focal_class.class_method_signature: ClientUtils.createChannelBuilder(Map<String, ?> configs)
focal_class.full_signature: public static ChannelBuilder createChannelBuilder(Map<String, ?> configs)
focal_class.identifier: createChannelBuilder
focal_class.modifiers: public static
focal_class.parameters: (Map<String, ?> configs)
focal_class.return: ChannelBuilder
focal_class.signature: ChannelBuilder createChannelBuilder(Map<String, ?> configs)
focal_method.body: public static List<InetSocketAddress> parseAndValidateAddresses(List<String> urls) {
          List<InetSocketAddress> addresses = new ArrayList<InetSocketAddress>();
          for (String url : urls) {
              if (url != null && url.length() > 0) {
                  String host = getHost(url);
                  Integer port = getPort(url);
                  if (host == null || port == null)
                      throw new ConfigException("Invalid url in " + CommonClientConfigs.BOOTSTRAP_SERVERS_CONFIG + ": " + url);
                  try {
                      InetSocketAddress address = new InetSocketAddress(host, port);
                      if (address.isUnresolved()) {
                          log.warn("Removing server from " + CommonClientConfigs.BOOTSTRAP_SERVERS_CONFIG + " as DNS resolution failed: " + url);
                      } else {
                          addresses.add(address);
                      }
                  } catch (NumberFormatException e) {
                      throw new ConfigException("Invalid port in " + CommonClientConfigs.BOOTSTRAP_SERVERS_CONFIG + ": " + url);
                  }
              }
          }
          if (addresses.size() < 1)
              throw new ConfigException("No resolvable bootstrap urls given in " + CommonClientConfigs.BOOTSTRAP_SERVERS_CONFIG);
          return addresses;
      }
focal_method.class_method_signature: ClientUtils.parseAndValidateAddresses(List<String> urls)
focal_method.full_signature: public static List<InetSocketAddress> parseAndValidateAddresses(List<String> urls)
focal_method.identifier: parseAndValidateAddresses
focal_method.invocations: length getHost getPort isUnresolved warn add size
focal_method.modifiers: public static
focal_method.parameters: (List<String> urls)
focal_method.return: List<InetSocketAddress>
focal_method.signature: List<InetSocketAddress> parseAndValidateAddresses(List<String> urls)