Product Version: NetBeans IDE Dev (Build 201309270002)
Java: 1.7.0_40; Java HotSpot(TM) 64-Bit Server VM 24.0-b56
Runtime: Java(TM) SE Runtime Environment 1.7.0_40-b43
System: Windows 7 version 6.1 running on amd64; Cp1252; en_CA (nb)
User directory: C:\Users\Gili\AppData\Roaming\NetBeans\dev
Cache directory: C:\Users\Gili\AppData\Local\NetBeans\Cache\dev
// throws A, B
catch (A | B | C e)
2. Netbeans flags multicatch line with "exception C is never thrown in the body of the corresponding try statement" and offers a hint "Remove catch clause".
3. If you apply the hint, Netbeans removes the entire multicatch statement.
Expected behavior: Hint should remove "C" from multicatch block, as opposed to removing the entire block.
NB javac currently reports position that corresponds to the entire 'catch' clause as if the reporting code was not updated when multicatch was added.
Dusane, please review a small patch; it should report the Type tree for the offending exception type in a multicatch clause, but should retain the behaviour for normal catches.
Created attachment 141047 [details]
Proposed patch to nb-javac
just ignore the project related changes, sorry. The only file to be modified is Flow.java
The proposed patch looks OK to me.
Fixed in rev http://hg.netbeans.org/jet-main/rev/838c029341ab, pending nb-javac patch nb-javac#698f6461a3bb
*** Bug 236808 has been marked as a duplicate of this bug. ***