Accessing internals in Java 11
Russell Gold
russell.gold at oracle.com
Tue Mar 27 12:11:19 UTC 2018
That would be true if it was easy to find the Javadoc for the class.
I think the problem may be that tooling for MR jars is still all-but-nonexistent, and that classes like Unsafe aren’t accessible when using the latest JDK with the —release switch. That, plus the much faster release schedule, means that we need to support a wider range of Java versions than ever before, but don’t have the tools to facilitate doing so.
- Russ
> On Mar 25, 2018, at 9:57 AM, Alan Bateman <Alan.Bateman at oracle.com> wrote:
>
> On 25/03/2018 08:32, Nicolai Parlog wrote:
>> Hi!
>>
>> On Java 9 and 10, the JPMS is forgiving when it comes to illegal
>> access of JDK internals and jdk.unsupported offers classes like Unsafe
>> or Signal. The same is true for 11-b5.
>>
>> Are there any plans to change this, i.e. will Java 11 become stricter
>> before the release? Would --illegal-access get a different default
>> value or might jdk.unsupported get smaller?
>>
> TBD on dialing up the encapsulation of JDK internals, JDK 11 might be too soon. I'm sure there will be lots of discussion on this once the time comes.
>
> The only changes to class in the jdk.unsupported module so far have been the removal of Reflection.getClassClass and Unsafe.defineClass. There were terminally deprecated (@Deprecated forRemoval=true) so shouldn't be a surprise to anyone.
>
> -Alan
More information about the jigsaw-dev
mailing list