dombizita commented on code in PR #6194: URL: https://github.com/apache/hadoop/pull/6194#discussion_r1363567945
########## hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/SecurityUtil.java: ########## @@ -786,4 +789,96 @@ public static List<ZKUtil.ZKAuthInfo> getZKAuthInfos(Configuration conf, throw e; } } + + public static void validateSslConfiguration(TruststoreKeystore truststoreKeystore) throws ConfigurationException { + if (org.apache.commons.lang3.StringUtils.isEmpty(truststoreKeystore.keystoreLocation)) { Review Comment: I thought of this too, but in this class we already have `org.apache.hadoop.util.StringUtils` imported and it is using `StringUtils.toLowerCase()` and `StringUtils.toUpperCase` from there. This library doesn't have the `isEmpty()` method and the `org.apache.commons.lang3.StringUtils` doesn't have the other two (at least they have a different name). What I could do is to use the `commons-lang3` and use the `upperCase()` and `lowerCase()` methods from there, but I didn't want to do unnecessary refactoring. Or I can check this here and not use `commons-lang3`: ``` truststoreKeystore.keystoreLocation == null || truststoreKeystore.keystoreLocation.isEmpty() ``` These were my first thoughts, let me know if you think something else could be done. -- 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. To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-issues-h...@hadoop.apache.org