We're decompiling .class files using Procyon.

Sometimes, it get's stuck, looping infinitely.

 

So what to do with that?

 

private class DecompileExecutor extends Thread {
    public void cancelDecompilation() {
        this.stop(new NullPointerException());
    }
}

 

(16:33:46) ozizka-FN: jsightler: this.stop(new NullPointerException());
(16:33:52) jsightler: yeah
(16:33:57) ozizka-FN: that makes a thread exit from a loop?
(16:34:22) jsightler: ozizka: I think it will make it throw a spurious NPE wherever it is
(16:34:51) LincolnThree: doesn't look like its thrown. what does stop() do with it?
(16:34:54) LincolnThree: reading javadocs..
(16:35:12) jsightler: lincolnthree: Yeah, it should be thrown by the thread itself, I think
(16:35:22) LincolnThree: jsightler: afaik this will do nothing
(16:35:27) ozizka-FN: That must have come from the darkest corners of consulting :)
(16:35:39) jsightler: lincolnthree: Er, it definitely doesn't do nothing (it does stop the thread in my tests)
(16:35:58) jsightler: ozizka: TBH, it comes over from overusing this method in the java 1.1 days (predeprection :) )
(16:36:08) LincolnThree: jsightler: oh wow. this method is actually still implemented
(16:36:26) jsightler: lincolnthree: Yeah, just dangerous. :)

 

Enjoy

 

WINDUP-343: Fixes for discover properties, and some other issues by jsight · Pull Request #305 · windup/windup · GitHub