Hi Paul,
Yes we have had a few discussions about some of our usage with the Oracle JVM QE group. We have also provided some feedback at the JCP level.
To give one example, if you want to provide an alternative serialization mechanism (e.g. to customize the protocol for various reasons such as performance, modularity, security), yet still support the Java serialization API/contract, you have to be able to instantiate empty uninitialized classes. This is something that Java serialization implementation itself can’t work without, but the Java language is not intended to allow you to do. So the common solution that many projects do to achieve this, is to either use reflection internals or the Unsafe. Other examples typically involve the latter (e.g. custom concurrency prims)
So naturally there has been resistance to expose hooks such as this, which is why I predict they won’t be there in Java 9. I would love to be proven wrong though :)
Jason, have you considered reaching out to Oracle (or have already) to discuss what internal APIs have no public replacement? They are very receptive to that kind of feedback.
--
Jason T. Greene
WildFly Lead / JBoss EAP Platform Architect
JBoss, a division of Red Hat