Jeroen Frijters writes:
> Andrew Haley wrote:
> > How, exactly? I see horrors like
> [...]
> > public static ClassLoader getCallingClassLoader()
> > {
> > Class[] ctx = getClassContext();
> > if (ctx.length < 3)
> > return null;
> > return getClassLoader(ctx[2]);
> > }
> >
> > in several places.
>
> Huh? The code you quoted is from VMStackWalker, you know the class
> that you are supposed to replace in your VM with a more efficient
> version.
I don't think that's a reasonable excuse for a bad interface. If we
had a better one, people could actually _use_ some of these
"reference" methods without having to rewrite them. I totally reject
the notion that it doesn't matter how inefficient the reference design
is -- if it's an example, it should be a good one.
Besides, it's not worth arguing. We need it for sun.misc.Unsafe
anyway.
Andrew.