gnu.gcj.runtime.StackTrace.findCallerClass()

Mohan Embar gnustuff@thisiscool.com
Wed Sep 10 14:54:00 GMT 2003


Hi Andrew,

>An example is worth a thousand words:
>
>  caller = findCallerClass(1);
>  caller_loader = caller ? caller->getClassLoaderInternal() : NULL;
>  if (caller_loader != NULL && ! caller_loader->isAncestorOf(loader))
>    s->checkPermission (new RuntimePermission (JvNewStringLatin1 ("getClassLoader")));
>
>When we get round to implementing proper Java security we'll have to
>close this loophole.  But not yet.

Thanks for clarifying this. I'll submit a patch for this. It should be
a pleasant break from the DatagramSocket stuff I'm struggling with.

-- Mohan
http://www.thisiscool.com/
http://www.animalsong.org/






More information about the Java-patches mailing list