On Nov 25, 2013, at 1:49 AM, Paul Sandoz <paul.san...@oracle.com> wrote:

> Just curious: why did you chose to add the method, throwIllegalAccessError, 
> to s.m.Unsafe and add Unsafe to the list pre-loaded classes rather than 
> modifying an existing pre-loaded class?

Unsafe is used everywhere, including from some of the preloaded classes.  Thus 
it will be preloaded even if it is not on the JVM's preload list, so there's no 
harm in naming it this way from the JVM.

And thus we get to the Naming Question...

As a class, Unsafe is a stable, non-public name space, and is (unusually) 
tightly coupled to the JVM.  It has no other qualifications specific to this 
new use.

We don't already have "sun.misc.InternalMethods", but it's not something we 
want to invent, just for this method.  David has noted that introducing a new 
class would complicate backporting.

— John

Reply via email to