lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dawid Weiss <>
Subject Re: [JENKINS] Lucene-Solr-tests-only-3.x - Build # 12908 - Failure
Date Thu, 29 Mar 2012 21:03:10 GMT
> I know. The VM specification does not even need to know the Exception type. If you trick

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...


View raw message