Community
Participate
Working Groups
Build Identifier: 20110916-0149 Multi-catch does not allow combining types that are in a super-subclass relationship. Quick fix should not offer "Add exception to existing catch clause" when the proposed type would violate this condition because it causes a compiler error (which is not a fix). Reproducible: Always Steps to Reproduce: public class Test { public static void main(String[] args) { try { throw new Exception(); // fix here } catch (IOException e) { } } }
Deepak, please take a look.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.
Still an issue in 4.14.
I rather suggest to quickfix the code and remove the subtype from the union.
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/169446
Gerrit change https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/169446 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=05721b15b0cf730e35b405b515cc2cffcd613e80
(In reply to Eclipse Genie from comment #6) > Gerrit change https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/169446 was > merged to [master]. > Commit: > http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=05721b15b0cf730e35b405b515cc2cffcd613e80 > Please explain what this commit intends to do and what is the value add. The commit message just says "Cleanup before fixing it" and the released patch does not look like a simple clean up. For any other change related to quick fixes, tests need to be added. Also, kindly set the Bugzilla fields correctly e.g. the target milestone so that it can be queried easily.
This first gerrit is a separate gerrit that only refactors the code and changes nothing. It merges common code and add empty newlines. It is split from the implementation I'm currently coding to make it more readable. PS: Thank you for the Target Milestone.
Thanks for the explanation, Fabrice. Please add such description to the commit message and/or bug comment going forward so that everyone knows the reasoning behind the commit.
New Gerrit change created: https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/169583
Gerrit change https://git.eclipse.org/r/c/jdt/eclipse.jdt.ui/+/169583 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=24324525631cb31bc0199a1410b325832d5fa1a8
Verified for 4.18M3 using I20201116-1800 build