Fixed bug when UnnecessaryLabel inspections never fire

This commit is contained in:
Alexey Kudravtsev
2005-02-25 20:34:23 +03:00
parent f23e268ec3
commit 48368e6169
2 changed files with 4 additions and 12 deletions
@@ -105,13 +105,9 @@ public class UnnecessaryLabelOnBreakStatementInspection extends StatementInspect
if (currentContainer == null) {
return;
}
final PsiElement containerParent = currentContainer.getParent();
if (exitedStatement.equals(containerParent)) {
return;
if (exitedStatement.equals(currentContainer)) {
registerStatementError(statement);
}
registerStatementError(statement);
}
}
}
@@ -98,13 +98,9 @@ public class UnnecessaryLabelOnContinueStatementInspection extends StatementInsp
if (currentContainer == null) {
return;
}
final PsiElement containerParent = currentContainer.getParent();
if (continuedStatement.equals(containerParent)) {
return;
if (continuedStatement.equals(currentContainer)) {
registerStatementError(statement);
}
registerStatementError(statement);
}
}
}