All questions are worthy of some study, but I’m not getting why you question 
the sanity of asking for the status of classes but have no problem with asking 
for the status of packages.

Do you have some vague sense of possible problems?

  Alan



> On Nov 30, 2016, at 8:45 AM, Alan Bateman <alan.bate...@oracle.com> wrote:
> 
> On 30/11/2016 15:51, Alan Snyder wrote:
> 
>> :
>> As Michael said, the hack is using reflection with setAccessible() to call 
>> the protected method ClassLoader::findLoadedClass().
>> 
>> Is there some conceptual or security reason to not provide this 
>> functionality in a public API?
> It's protected because it's for use in class loader implementations. It is 
> final so it could potentially be changed to public but would require a lot of 
> consideration before going that road. To be honest, the scenario is a bit 
> odd, there must be a saner solution that doesn't involve checking if classes 
> are loaded.
> 
> -Alan

Reply via email to