[codeInsight] IDEA-201714 Missing "fix all" for "Redundant throws clause"

This patch fixes the notes from the code review it includes:

- splitting the code that detects related @throws in the local inspection from the code that is used in the global one
- related @throws are no longer returned if one of the duplicates in the throws list is being removed
- related @throw tags are not being removed if there is an element in the throws list that can be assigned with the class of the @throws tag

Signed-off-by: Nikita Eshkeev <nikita.eshkeev@jetbrains.com>

GitOrigin-RevId: e68823093d88427dbbb7efa0cd1171988d1f5360
This commit is contained in:
Nikita Eshkeev
2020-07-21 22:58:57 +00:00
committed by intellij-monorepo-bot
parent 965d99816a
commit 82099584a0
5 changed files with 117 additions and 28 deletions
@@ -7,6 +7,10 @@ class A {
/**
* @since 2020.3
* @author me
* @throws Exception first exception
* @throws Exception second exception
* @throws FileNotFoundException file not found
* @throws IOException IO exception
*/
void f() throws /* 1 */ Exception /* 2 */ /* 3 */ /* 4 */ {}
}
@@ -7,6 +7,7 @@ class A {
/**
* @since 2020.3
* @author me
* @throws FileNotFoundException file not found
* @throws IOException IO exception
*/
void f() throws /* 1 */ /* 2 */ /* 3 */ IOException /* 4 */ {}
@@ -9,6 +9,7 @@ class A {
* @author me
* @throws Exception first exception
* @throws Exception second exception
* @throws FileNotFoundException file not found
*/
void f() throws /* 1 */ Exception /* 2 */ /* 3 */ /* 4 */ {}
}