mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 06:50:54 +07:00
(no message)
This commit is contained in:
@@ -35,7 +35,7 @@ public class ParameterOfConcreteClassInspection extends MethodInspection {
|
||||
public void visitParameter(PsiParameter parameter) {
|
||||
super.visitParameter(parameter);
|
||||
|
||||
if (parameter.getParent() instanceof PsiTryStatement) {
|
||||
if (parameter.getDeclarationScope() instanceof PsiTryStatement) {
|
||||
return;
|
||||
}
|
||||
final PsiTypeElement typeElement = parameter.getTypeElement();
|
||||
|
||||
@@ -44,7 +44,7 @@ public class AssignmentToCatchBlockParameterInspection extends ExpressionInspect
|
||||
if (!(variable instanceof PsiParameter)) {
|
||||
return;
|
||||
}
|
||||
if (!(variable.getParent() instanceof PsiTryStatement)) {
|
||||
if (!(((PsiParameter)variable).getDeclarationScope() instanceof PsiTryStatement)) {
|
||||
return;
|
||||
}
|
||||
registerError(expression);
|
||||
|
||||
@@ -85,7 +85,7 @@ public class AssignmentToMethodParameterInspection extends ExpressionInspection
|
||||
if (!(variable instanceof PsiParameter)) {
|
||||
return;
|
||||
}
|
||||
if (variable.getParent() instanceof PsiTryStatement) {
|
||||
if (((PsiParameter)variable).getDeclarationScope() instanceof PsiTryStatement) {
|
||||
return;
|
||||
}
|
||||
registerError(expression);
|
||||
|
||||
@@ -70,7 +70,7 @@ public class ExceptionFromCatchWhichDoesntWrapInspection extends StatementInspec
|
||||
final PsiElement referent = ref.resolve();
|
||||
if (referent != null
|
||||
&& referent instanceof PsiParameter
|
||||
&& referent.getParent() instanceof PsiTryStatement) {
|
||||
&& ((PsiParameter)referent).getDeclarationScope() instanceof PsiTryStatement) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ public class InstanceofCatchParameterInspection extends ExpressionInspection {
|
||||
if (!(referent instanceof PsiParameter)) {
|
||||
return;
|
||||
}
|
||||
if (!(referent.getParent() instanceof PsiTryStatement)) {
|
||||
if (!(((PsiParameter)referent).getDeclarationScope() instanceof PsiTryStatement)) {
|
||||
return;
|
||||
}
|
||||
registerError(exp);
|
||||
|
||||
@@ -26,8 +26,7 @@ class NestingDepthVisitor extends PsiRecursiveElementVisitor {
|
||||
parent instanceof PsiWhileStatement ||
|
||||
parent instanceof PsiForStatement ||
|
||||
parent instanceof PsiIfStatement ||
|
||||
parent instanceof PsiSynchronizedStatement ||
|
||||
parent instanceof PsiTryStatement;
|
||||
parent instanceof PsiSynchronizedStatement;
|
||||
if (!isAlreadyCounted) {
|
||||
enterScope();
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ public class LocalVariableNamingConventionInspection extends ConventionInspectio
|
||||
|
||||
public void visitParameter(PsiParameter variable) {
|
||||
final boolean isCatchParameter =
|
||||
variable.getParent() instanceof PsiTryStatement;
|
||||
variable.getDeclarationScope() instanceof PsiTryStatement;
|
||||
if (!isCatchParameter) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ public class ParameterNamingConventionInspection extends ConventionInspection {
|
||||
}
|
||||
|
||||
public void visitParameter(PsiParameter variable) {
|
||||
if (variable.getParent() instanceof PsiTryStatement) {
|
||||
if (variable.getDeclarationScope() instanceof PsiTryStatement) {
|
||||
return;
|
||||
}
|
||||
final String name = variable.getName();
|
||||
|
||||
@@ -108,7 +108,7 @@ public class LocalVariableHidingMemberVariableInspection extends MethodInspectio
|
||||
|
||||
public void visitParameter(PsiParameter variable) {
|
||||
super.visitParameter(variable);
|
||||
if (!(variable.getParent() instanceof PsiTryStatement)) {
|
||||
if (!(variable.getDeclarationScope() instanceof PsiTryStatement)) {
|
||||
return;
|
||||
}
|
||||
final PsiClass aClass =
|
||||
|
||||
@@ -50,7 +50,7 @@ public class ParameterHidingMemberVariableInspection extends MethodInspection {
|
||||
|
||||
public void visitParameter(PsiParameter variable) {
|
||||
super.visitParameter(variable);
|
||||
if (variable.getParent() instanceof PsiTryStatement) {
|
||||
if (variable.getDeclarationScope() instanceof PsiTryStatement) {
|
||||
return;
|
||||
}
|
||||
final PsiMethod method =
|
||||
|
||||
Reference in New Issue
Block a user