Review request: JDK-8211122: Reduce the number of internal classes made accessible to jdk.unsupported

Mandy Chung mandy.chung at
Tue Nov 6 01:59:37 UTC 2018

Thanks for the review, Vladimir.  hotspot tier1-3 and jdk tier1-3 all 
I will submit another test run as sanity tests before I push.


On 11/5/18 5:51 PM, Vladimir Kozlov wrote:
> I looked on tests changes in src/jdk.internal.vm.compiler and 
> test/hotspot/jtreg/compiler/jvmci. They look fine.
> And you ran hotspot tier1-3 which tests AOT, JVMCI and Graal. So your 
> changes should be fine regarding them since you did not get failures.
> Thanks,
> Vladimir
> On 11/1/18 9:16 PM, Mandy Chung wrote:
>> This patch includes the following changes that will reduce the
>> number of internal classes made accessible to jdk.unsupported
>> module via qualified exports.
>> 1. move shared secrets to a new jdk.internal.access package.
>> jdk.internal.misc package has been a dumping ground for various
>> kinds of internal APIs and many of which were moved to an appropriate
>> package. This is a follow-up clean up that moves the shared secrets
>> and JavaXXXAccess interfaces to jdk.internal.access package.
>> 2. add a wrapper class jdk.internal.misc.FileSystemOption to expose
>> sun.nio.fs.ExtendedOptions for com.sun.nio.file to access
>> This eliminates the qualified exports of sun.nio.fs to jdk.unsupported.
>> 3. Refactor the implementation of sun.misc.Unsafe::invokeCleaner
>> to jdk.internal.misc.Unsafe.
>> This eliminates the qualified exports of jdk.internal.ref and
>> to jdk.unsupported.
>> Webrev:
>> The change is straight forward although quite many files are modified.
>> Majority of the changes is import statement change or test @modules
>> change due to the rename.
>> I ran hs-tier1-3 and jdk-tier1-3 tests.
>> We considered the alternative to define a wrapper class for everything
>> that jdk.unsupported module depends on in a dedicated package
>> e.g. jdk.internal.unsupported.  It would need a wrapper for Unsafe,
>> Signal, SignalHandler and ExtendedOptions.  It means that it would
>> have 3 classes of each - two similar/duplicated implementations
>> (one in sun.misc and one in jdk.internal.unsupported) and one
>> in jdk.internal.misc ([1] is the prototype).  Only a limited number
>> of files are touched but I think the proposed approach is cleaner.
>> Thanks
>> Mandy
>> [1]

More information about the hotspot-dev mailing list