lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler" <...@thetaphi.de>
Subject RE: [JENKINS] Lucene-Solr-tests-only-3.x - Build # 12908 - Failure
Date Thu, 29 Mar 2012 22:00:07 GMT
> 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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message