annotations

This commit is contained in:
Bas Leijdekkers
2012-04-06 16:24:17 +02:00
parent 28541a3a42
commit 0ef6978e3e
3 changed files with 7 additions and 6 deletions
@@ -33,11 +33,10 @@ import javax.swing.*;
public class MagicNumberInspection extends BaseInspection {
/**
* @noinspection PublicField
*/
@SuppressWarnings("PublicField")
public boolean ignoreInHashCode = true;
@SuppressWarnings("PublicField")
public boolean ignoreInTestCode = false;
@Override
@@ -42,7 +42,7 @@ public class TooBroadCatchInspection extends BaseInspection {
@SuppressWarnings({"PublicField"})
public boolean onlyWarnOnRootExceptions = false;
@SuppressWarnings("UnusedDeclaration")
@SuppressWarnings("PublicField")
public boolean ignoreInTestCode = false;
@Override
@@ -229,7 +229,9 @@ public class TooBroadCatchInspection extends BaseInspection {
final List<PsiClass> maskedExceptions = findMaskedExceptions(exceptionsThrown, exceptionsCaught, type);
if (!maskedExceptions.isEmpty()) {
final PsiTypeElement typeElement = parameter.getTypeElement();
registerError(typeElement, maskedExceptions);
if (typeElement != null) {
registerError(typeElement, maskedExceptions);
}
}
}
@@ -37,7 +37,7 @@ public class TooBroadThrowsInspection extends BaseInspection {
@SuppressWarnings({"PublicField"})
public boolean onlyWarnOnRootExceptions = false;
@SuppressWarnings("UnusedDeclaration")
@SuppressWarnings("PublicField")
public boolean ignoreInTestCode = false;
@Override