From 83f58b492f6d5e9b0d0b8381fff448f1bd76db85 Mon Sep 17 00:00:00 2001 From: Dmitry Batkovich Date: Mon, 30 May 2016 17:52:04 +0300 Subject: [PATCH] guava type migration: problem descriptor class cast fixed EA-83023 --- .../typeMigration/inspections/GuavaInspection.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/java/typeMigration/src/com/intellij/refactoring/typeMigration/inspections/GuavaInspection.java b/java/typeMigration/src/com/intellij/refactoring/typeMigration/inspections/GuavaInspection.java index dee2204f1db7..61156e6b25a5 100644 --- a/java/typeMigration/src/com/intellij/refactoring/typeMigration/inspections/GuavaInspection.java +++ b/java/typeMigration/src/com/intellij/refactoring/typeMigration/inspections/GuavaInspection.java @@ -280,7 +280,7 @@ public class GuavaInspection extends BaseJavaLocalInspectionTool { }; } - public class MigrateGuavaTypeFix extends LocalQuickFixAndIntentionActionOnPsiElement implements BatchQuickFix { + public class MigrateGuavaTypeFix extends LocalQuickFixAndIntentionActionOnPsiElement implements BatchQuickFix { private final PsiType myTargetType; private MigrateGuavaTypeFix(@NotNull PsiElement element, PsiType targetType) { @@ -333,13 +333,13 @@ public class GuavaInspection extends BaseJavaLocalInspectionTool { @Override public void applyFix(@NotNull final Project project, - @NotNull ProblemDescriptor[] descriptors, + @NotNull CommonProblemDescriptor[] descriptors, @NotNull List psiElementsToIgnore, @Nullable Runnable refreshViews) { final List elementsToFix = new ArrayList(); final List migrationTypes = new ArrayList(); - for (ProblemDescriptor descriptor : descriptors) { + for (CommonProblemDescriptor descriptor : descriptors) { final MigrateGuavaTypeFix fix = getFix(descriptor); elementsToFix.add(fix.getStartElement()); migrationTypes.add(fix.myTargetType); @@ -348,7 +348,7 @@ public class GuavaInspection extends BaseJavaLocalInspectionTool { if (!elementsToFix.isEmpty()) performTypeMigration(elementsToFix, migrationTypes); } - private MigrateGuavaTypeFix getFix(ProblemDescriptor descriptor) { + private MigrateGuavaTypeFix getFix(CommonProblemDescriptor descriptor) { final QuickFix[] fixes = descriptor.getFixes(); LOG.assertTrue(fixes != null); for (QuickFix fix : fixes) {