I've been making use of the new try-with-resources syntax when I upgraded to AJDT 2.2.0 a few weeks back (and could start using Java 7 in my AspectJ projects), but the aspects I wrote to soften IOException don't seem to catch the automatic close() created by the new syntax:
Eclipse reports a compile error on the try... line, saying: "Unhandled exception type IOException thrown by automatic close() invocation on reader". The only way I've managed to get around this is to add a catch clause to the try for the IOException, or to have the method throw IOException, which kind of goes against the reason I did the exception softening in the first place (to cut down on throws or catch clauses).
Is there another way to soften the automatic close while using the new syntax?
The error appears in both the problems view and in the editor ('reader' in the example above is underlined red and the error icon is also showing in the left of the line). No additional exceptions/errors show in the Error Log (only info messages about other things like how long weaving/building the rest of the workspace took). Compliance level is set to 1.7.
I just tried compiling the code with ajc via the command line and I get a compile error with the same message and line number, so if there's a problem it might be with AspectJ.