Jeroen Frijters wrote:
Steven Augart wrote:

It is now the documented behaviour as of JDK 1.5.0rc1. (And it is *really annoying* to implement in a VM written in Java, like Jikes RVM).


A while ago it occurred to me that Thread.stop(Throwable) can also be
used to throw arbitrary exceptions (on the current thread). It's
deprecated of course, but Sun still supports it (as of JDK 1.5.0-rc).

BTW, I'm curious, why is it hard to implement VMClass.throwException on
JikesRVM?

I was wrong. I'd forgotten about a back door (our VM_Runtime.athrow method).


Of course, if Class.newInstance were properly declared (as throwing any Throwable) then I wouldn't have had to use VM_Runtime.athrow; implementing VMClass.throwException would have just been a matter of using the "throw" statement.

--Steve Augart

--
Steven Augart

Jikes RVM, a free, open source, Virtual Machine:
http://oss.software.ibm.com/jikesrvm



_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/classpath

Reply via email to