You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Alan (JIRA)" <ji...@apache.org> on 2018/11/11 18:14:00 UTC

[jira] [Comment Edited] (SPARK-24421) Accessing sun.misc.Cleaner in JDK11

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

Alan edited comment on SPARK-24421 at 11/11/18 6:13 PM:
--------------------------------------------------------

Sean: In the proposed release note text you say that access to the internal JDK classes "is no longer possible in Java 9 and later, because of the new module encapsulation system". I don't think this is quite right as the main issue you ran into is that the JDK's internal cleaner mechanism was refactored and moved from sun.misc to jdk.internal.ref. Also the comment about using add-opens may need update too as java.lang remains open to code on the class path in JDK 9/10/11. I suspect the the comments in this issue about add-opens meant to say jdk.internal.ref instead (although you just don't want to go there as directly using anything in that package may break at any time).


was (Author: bateman):
Sean - In the proposed release note text you say that access to the internal JDK classes "is no longer possible in Java 9 and later, because of the new module encapsulation system". I don't think this is quite right as the main issue you ran into is that the JDK's internal cleaner mechanism was refactored and moved from sun.misc to jdk.internal.ref. Also the comment about using `--add-opens` may need update too as java.lang remains open to code on the class path in JDK 9/10/11. I suspect the the comments in this issue about `--add-opens` meant to say jdk.internal.ref instead (although you just don't want to go there as directly using anything in that package may break at any time).

> Accessing sun.misc.Cleaner in JDK11
> -----------------------------------
>
>                 Key: SPARK-24421
>                 URL: https://issues.apache.org/jira/browse/SPARK-24421
>             Project: Spark
>          Issue Type: Sub-task
>          Components: Build
>    Affects Versions: 3.0.0
>            Reporter: DB Tsai
>            Priority: Major
>              Labels: release-notes
>
> Many internal APIs such as unsafe are encapsulated in JDK9+, see http://openjdk.java.net/jeps/260 for detail.
> To use Unsafe, we need to add *jdk.unsupported* to our code’s module declaration:
> {code:java}
> module java9unsafe {
>     requires jdk.unsupported;
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org