Review request: JDK-8211122: Reduce the number of internal classes made accessible to jdk.unsupported
Alan.Bateman at oracle.com
Fri Nov 2 16:16:07 UTC 2018
On 02/11/2018 04:16, 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
> sun.nio.ch to jdk.unsupported.
I skimmed through the changes and I think they are okay.
A minor comment on SharedSecrets is that it might be a bit clearer
import Unsafe. Also in FileSystemOption there is a typo in the javadoc
for the register method, I assume you mean "register as an OpenOption".
More information about the hotspot-dev