Stack traces, etc.

Mark Wielaard mark@klomp.org
Sat Nov 30 02:57:00 GMT 2002


Hi,

On Sat, 2002-11-30 at 00:53, Andrew Haley wrote:
> The interface to StackTrace will probably change.  In any case, it's
> only for libgcj's internal use.

You renamed VMThrowable to StackTrace and put it in another package,
this makes Throwable not in sync with Classpath anymore. I am trying
(very slowly) to get the public classes from Classpath and libgcj as
much in sync as possible. The StackTrace interface expands the
VMThrowable interface but still uses the same methods used by the public
class Throwable. So I would like to see it renamed back to VMThrowable,
unless there is a good argument to diverge Throwable from the Classpath
version.

> * This implementation has a security hole, in that anyone may call
>   StackTrace.classAt() and get the calling class.  We'll have to
>   restrict the availability of StackTrace.

Since these methods are only used from either classes in java.lang or
from friend classes written in C++ it is a good idea to make those
methods package private and put it in the package java.lang. That way
ordinary java classes cannot access it.

Cheers,

Mark



More information about the Java mailing list