Hi Peter,

>As mentioned, Class.newInstance() has a special cache for constructor
>and caller that speeds up repeated invocations from the same caller by
>skipping access checks.

I'm sure I'm missing something obvious related to performance or security but, 
couldn't the exact same 'cachedConstructor' field be used for caching  
Class.getConstructor(new Class[0]) as long as a constructor copy is returned?
That way the recommended workaround is near the same performance.

Jason

Reply via email to