jonathan-albrecht-ibm commented on code in PR #12343: URL: https://github.com/apache/kafka/pull/12343#discussion_r1024093478
########## core/src/test/scala/kafka/security/minikdc/MiniKdc.scala: ########## @@ -260,11 +260,17 @@ class MiniKdc(config: Properties, workDir: File) extends Logging { } private def refreshJvmKerberosConfig(): Unit = { - val klass = - if (Java.isIbmJdk) - Class.forName("com.ibm.security.krb5.internal.Config") - else - Class.forName("sun.security.krb5.Config") + // Newer IBM JDKs use the OpenJDK security providers so try that first + val klass = try { + Class.forName("sun.security.krb5.Config") + } catch { + case ex: Exception => { + if (Java.isIbmJdk) + Class.forName("com.ibm.security.krb5.internal.Config") + else + throw ex + } + } Review Comment: The idea was to just check for the classes directly but you're definitely right that `Java.isIbmJdkSemeru` is more readable. I have a new commit to make this change and the other one below, but I'll hold off on pushing it to see if any more feedback from @ijuma or @hachikuji. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org