This commit is contained in:
Alexey Kudravtsev
2013-06-14 11:46:45 +04:00
parent 1ff5327fa2
commit 3c8a0f4e23
2 changed files with 7 additions and 4 deletions
@@ -46,9 +46,12 @@ public class SameParameterValueInspection extends GlobalJavaInspectionTool {
@Override
@Nullable
public CommonProblemDescriptor[] checkElement(@NotNull RefEntity refEntity, @NotNull AnalysisScope scope, @NotNull InspectionManager manager, @NotNull GlobalInspectionContext globalContext,
public CommonProblemDescriptor[] checkElement(@NotNull RefEntity refEntity,
@NotNull AnalysisScope scope,
@NotNull InspectionManager manager,
@NotNull GlobalInspectionContext globalContext,
@NotNull ProblemDescriptionsProcessor processor) {
ArrayList<ProblemDescriptor> problems = null;
List<ProblemDescriptor> problems = null;
if (refEntity instanceof RefMethod) {
final RefMethod refMethod = (RefMethod)refEntity;
@@ -70,7 +70,7 @@ public class RedundantThrows extends GlobalJavaInspectionTool {
PsiMethod psiMethod = (PsiMethod)refMethod.getElement();
PsiClassType[] throwsList = psiMethod.getThrowsList().getReferencedTypes();
PsiJavaCodeReferenceElement[] throwsRefs = psiMethod.getThrowsList().getReferenceElements();
ArrayList<ProblemDescriptor> problems = null;
List<ProblemDescriptor> problems = null;
final PsiManager psiManager = psiMethod.getManager();
for (int i = 0; i < throwsList.length; i++) {
@@ -105,7 +105,7 @@ public class RedundantThrows extends GlobalJavaInspectionTool {
}
if (problems != null) {
return problems.toArray(new ProblemDescriptorBase[problems.size()]);
return problems.toArray(new CommonProblemDescriptor[problems.size()]);
}
}