nkalmar commented on a change in pull request #1353: URL: https://github.com/apache/zookeeper/pull/1353#discussion_r428029871
########## File path: zookeeper-server/src/main/java/org/apache/zookeeper/common/ZKHostnameVerifier.java ########## @@ -324,8 +324,14 @@ private static HostNameType determineHostFormat(final String host) { for (List<?> entry : entries) { final Integer type = entry.size() >= 2 ? (Integer) entry.get(0) : null; if (type != null) { - final String s = (String) entry.get(1); - result.add(new SubjectName(s, type)); + if (type == SubjectName.DNS || type == SubjectName.IP) { + final Object o = entry.get(1); + if (o instanceof String) { + result.add(new SubjectName((String) o, type)); + } else if (o instanceof byte[]) { + // TODO ASN.1 DER encoded form Review comment: Didn't see it's a static method. But I believe you can log by making the logger also static. Not sure it is worth it though, it's not a stopper from my side if we leave the TODO, just a nice-to-have. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org