[kaffe] possible problem in Class.CallStack

Dalibor Topic robilad at yahoo.com
Fri Jul 26 04:42:31 PDT 2002


--- gonzo <Robert.N.Gonzalez at williams.edu> wrote:
> method getCallersClassLoader
> line 463
>   if (callingClass != null
>       &&
>
callingClass.getName().equals("java.lang.reflect.Method"))
> {
> 		frame += 2;
> 		callingClass = callStack.getStackClass(frame);
>   }
> 
> 
> it is possible for a programmer to write his own
> class loader which loads
> a class java.lang.reflect.Method from his own
> java.lang.reflect package,
> in which case getCallersClassLoader would return the
> Class of a method 2
> frames deeper in the call stack than desired.
> 
> a possible fix is to check that, not only does
>
callingClass.getName().equals("java.lang.reflect.Method"),
> but also to
> check that callingClass.getClassLoader() returns the
> system class loader.
> this would only slow things down in the case where
> the second check is
> necessary.

thanks, I will fix it.

best regards,

dalibor topic



__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com




More information about the kaffe mailing list