> There is yet another method that... It requires a hex editor though :) 
> Declare a
> method that throws:
> 
> public static void rethrow(buzz.lang.Throwable e) {
>   throw e;
> }
> 
> and define buzz.lang.Throwable as extending RuntimeException (or anything
> unchecked). Then open your hex editor and s/buzz/java/g.
> Because Java classes have no integrity checking whatsoever -- voila, you have
> your rethrow class/method now. A real keeper ;)

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

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

Uwe


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

Reply via email to