You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ranger.apache.org by "Lars Francke (Jira)" <ji...@apache.org> on 2020/01/24 09:03:00 UTC

[jira] [Commented] (RANGER-2317) Enable compilation on JDK11

    [ https://issues.apache.org/jira/browse/RANGER-2317?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17022786#comment-17022786 ] 

Lars Francke commented on RANGER-2317:
--------------------------------------

It's an old issue and I can create a new one but Ranger doesn't compile on JDK 11 for me.

 

RangerSafenetKeySecure:
{code:java}
if(javaVersion == 8){
 provider = new sun.security.pkcs11.SunPKCS11(pkcs11CfgFilePath);
}else if(javaVersion == 9 || javaVersion == 10 || javaVersion == 11){

{code}
This compiles with JDK8 but not JDK11:
 * [https://github.com/AdoptOpenJDK/openjdk-jdk8u/blob/f96267b807c9e2b2092fa522b3898a5ae7b82b2e/jdk/src/share/classes/sun/security/pkcs11/SunPKCS11.java#L96-L108]
 * [https://github.com/AdoptOpenJDK/openjdk-jdk9u/blob/bdce31f03903a276abac0efd5fe4bfac4a0b1090/jdk/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/SunPKCS11.java#L92-L104]
 * [https://github.com/AdoptOpenJDK/openjdk-jdk10u/blob/89fdfabc1a51964b32744cc21f4523051d490468/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/SunPKCS11.java#L92-L104]
 * [https://github.com/AdoptOpenJDK/openjdk-jdk11u/blob/56da4f8137879a61df4815f210c43c536302c863/src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/SunPKCS11.java#L91-L103]

 

The constructor taking a String has been removed in JDK9. The whole feature is "gated" in the if statement (not sure if that's valid) but obviously it still needs to compile and that fails as of JDK 9

 

> Enable compilation on JDK11
> ---------------------------
>
>                 Key: RANGER-2317
>                 URL: https://issues.apache.org/jira/browse/RANGER-2317
>             Project: Ranger
>          Issue Type: Improvement
>          Components: admin, plugins
>            Reporter: Zsombor Gegesy
>            Assignee: Zsombor Gegesy
>            Priority: Major
>             Fix For: 2.0.0
>
>         Attachments: RANGER-2317-2.patch, RANGER-2317-3.patch
>
>
> Currently, Ranger can be compiled only with JDK 8, however JDK 11 is the current LTS release for Java, it is essential to support it. As a first step, we need to ensure that Ranger can be compiled on JDK 11.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)