lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Willnauer <simon.willna...@googlemail.com>
Subject Re: [JENKINS] Lucene-Solr-tests-only-3.x - Build # 12908 - Failure
Date Thu, 29 Mar 2012 21:05:53 GMT
I knew david is editing his class files manually! nerd!

:D

On Thu, Mar 29, 2012 at 11:03 PM, Dawid Weiss
<dawid.weiss@cs.put.poznan.pl> wrote:
>> I know. The VM specification does not even need to know the Exception type. If you
trick the
>
> Exactly. Students also always found it surprising that a try {} catch
> block doesn't actually add any overhead (or generate any code). A
> ghost instruction, truly. ;)
>
>> static void sneakyThrow(Throwable t) {
>>  Thread.currentThread().stop(t);
>> }
>
> Yep, this one is one classic method, isn't it ;)
>
> 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 ;)
>
> I attach it for those unfaithful...
>
> Dawid
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: dev-help@lucene.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message