> That's not different from the Rethrow with generics aproach. You trick javac 
> to exactly create that class with unexpected throws declaration :-)

I think it is different in that it shows different ways to get at the
same underlying flaw/feature (JVM not distinguishing checked/
unchecked exceptions) --

1) the generics trick shows shortcomings of type erasure system (and
inference rules); byw. I still think it's ingenious to come up with
backwards compatible generics at compile-time, even if I'd rather see
incompatible JVM spec changes like they did .NET.
2) the bytecode modification trick shows how .class files are
unprotected to accidental or intentional modifications and how
modifications to the constant pool can lead to runtime behavior
changes.
3) Thread.stop() shows the marvels of standard library's API and an
abuse of @Deprecated :)

Depends what you want to demonstrate.

> But editing class files is nice, I use not a hex editor, there are nice tools 
> to do that :-)

But if I used asm or bcel it wouldn't be so much, would it. :)

Dawid

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to