Summary: | [compiler] Eclipse compiler generates code that calls the finally block twice | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Tushar Pokle <tushar.pokle> |
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | critical | ||
Priority: | P3 | ||
Version: | 3.1 | ||
Target Milestone: | 3.1 RC2 | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: |
Description
Tushar Pokle
2005-06-08 04:30:22 EDT
Oops ! Thanks for finding this. This only occurs when performing JSR inline (like in compliant 1.5 mode). Problem comes from an exception attribute range which comprises the inlined finally block, thus in case of exception, it gets trapped and activates the any exception handler (second invocation of the finally block). Added TryStatementTest#test027-028. Fixed by exit/entering subroutine code when performing inlining of finally block at exit locations in code. Fixed Thanks Philippe! Good work :-) Output is now: So long! And thanks for all the fish! Exception in thread "main" java.lang.IllegalStateException: Gah! at TooManyTimes$InnerClass.foo(TooManyTimes.java:19) at TooManyTimes$InnerClass.start(TooManyTimes.java:14) at TooManyTimes.main(TooManyTimes.java:4) Verified with N20050609-0010 + JDT/Core HEAD Verified for 3.1 RC2 using build I20050610-0010 |