boolean (@NotNull Ref<UsageInfo[]> refUsages) { final UsageInfo[] usagesIn = refUsages.get(); ArrayList<UsageInfo> oldUsages = new ArrayList<>(); Collections.addAll(oldUsages, usagesIn); final ObjectUpcastedUsageInfo[] objectUpcastedUsageInfos = objectUpcastedUsages(usagesIn); if (myPrepareSuccessfulSwingThreadCallback != null) { MultiMap<PsiElement, String> conflicts = new MultiMap<>(); if (objectUpcastedUsageInfos.length > 0) { final String message = JavaRefactoringBundle.message("instances.of.0.upcasted.to.1.were.found", RefactoringUIUtil.getDescription(myClass, true), CommonRefactoringUtil.htmlEmphasize( CommonClassNames.JAVA_LANG_OBJECT)); conflicts.putValue(myClass, message); } analyzeConflicts(usagesIn, conflicts); if (!conflicts.isEmpty()) { ConflictsDialogBase conflictsDialog = prepareConflictsDialog(conflicts, usagesIn); if (!conflictsDialog.showAndGet()) { if (conflictsDialog.isShowConflicts()) prepareSuccessful(); return false; } } if (objectUpcastedUsageInfos.length > 0) { showObjectUpcastedUsageView(objectUpcastedUsageInfos); setPreviewUsages(true); } } ArrayList<UsageInfo> filteredUsages = filterUsages(oldUsages); refUsages.set(filteredUsages.toArray(UsageInfo.EMPTY_ARRAY)); prepareSuccessful(); return true; }