<AWT Dev> [11u]: Backport of RFR 8211122: Reduce the number of internal classes made accessible to jdk.unsupported

Langer, Christoph christoph.langer at sap.com
Wed Jun 26 15:03:38 UTC 2019


next try, here we go again...

I'd like to backport "JDK-8211122: Reduce the number of internal classes made accessible to jdk.unsupported". The main reason for backporting this item is that it'll ease further backports which base on that changeset (e.g. JDK-8216039). The patch is quite extensive and so doesn't fully apply. I had to resolve some rejects and also modify a few other places. Lots of the rejects were about copyright years (especially in the hotspot tests) which could be dropped. Find below the link for a full webrev and an incremental one which only contains my manual changes. Testing in SAP's test system does not show regressions.

My initial proposal for the backport of this change assumed that we could take JDK-8205537 and JDK-8211121 as prerequisites [0]. I have to step back from that idea because both changes would remove stuff which you probably don't want to remove in an update release. The modifications to this patch to accommodate for the missing prerequisites are quite minor, though. In java.desktop's sun.applet.AppletSecurity.java we only have to include the SharedSecrets from the new package jdk.internal.access instead of jdk.internal.misc. To keep jdk.unsupported's sun.reflect.ReflectionFactory::newInstanceForSerialization method working without having to open up jdk.internal.access for jdk.unsupported (which was the whole purpose of this change) we need to keep little wrapper stubs for jdk.internal.misc.JavaSecurityAccess and jdk.internal.misc.SharedSecrets.

Here are the links:
Original bug: https://bugs.openjdk.java.net/browse/JDK-8211122 
Original review discussion: https://mail.openjdk.java.net/pipermail/core-libs-dev/2018-November/056397.html 
Original changeset: http://hg.openjdk.java.net/jdk/jdk/rev/3c6aa484536c 
Full webrev: http://cr.openjdk.java.net/~clanger/webrevs/8211122.11u.full.1/ 
Incremental Webrev of manual changes: http://cr.openjdk.java.net/~clanger/webrevs/8211122.11u.manual.1/ 
Rejects of the original apply: http://cr.openjdk.java.net/~clanger/webrevs/8211122.rejects.patch 


[0] https://mail.openjdk.java.net/pipermail/jdk-updates-dev/2019-June/001316.html 

More information about the awt-dev mailing list