acharneski commented on a change in pull request #42: PRELIMINARY - Adding support for ElasticSearch URL: https://github.com/apache/ranger/pull/42#discussion_r348228857
########## File path: kms/src/main/java/org/apache/hadoop/crypto/key/RangerSafenetKeySecure.java ########## @@ -69,7 +70,7 @@ public RangerSafenetKeySecure(Configuration conf) throws Exception { int javaVersion = getJavaVersion(); /*Minimum java requirement for Ranger KMS is Java 8 and Maximum java supported by Ranger KMS is Java 11*/ if(javaVersion == 8){ - provider = new sun.security.pkcs11.SunPKCS11(pkcs11CfgFilePath); + provider = sun.security.pkcs11.SunPKCS11.class.getConstructor(String.class).newInstance(pkcs11CfgFilePath); Review comment: Using reflection here prevents compilation errors when using Java 11 ---------------------------------------------------------------- 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 With regards, Apache Git Services