Comment

Comment by xxs

try/finally is effectively try/catch(Throwable) with copy all the code of the finally block prior to exiting the method. (Java doesn't have a direct bytecode support for 'finally')

Nothing that cursed.

It compiles to this:

  void foo() {
    for (;;) {
      try {
        continue;
        return; } 
      catch (Throwable t) { continue; }
    }
  }
parent xxs 11 months ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton