boolean (@NotNull Ref<UsageInfo[]> refUsages) { final UsageInfo[] usages = refUsages.get(); MultiMap<PsiElement, @DialogMessage String> conflicts = new MultiMap<>(); RenameUtil.addConflictDescriptions(usages, conflicts); Set<PsiField> conflictingFields = new SmartHashSet<>(); for (UsageInfo usage : usages) { if (usage instanceof BrokenEncapsulationUsageInfo) { conflicts.putValue(usage.getElement(), ((BrokenEncapsulationUsageInfo)usage).myErrMsg); } else if (usage instanceof FieldUsageInfo) { conflictingFields.add(((FieldUsageInfo)usage).myField); } else if (usage instanceof RenameMethodUsageInfo renameMethodInfo) { RenamePsiElementProcessor renameMethodProcessor = RenamePsiElementProcessor.forElement(renameMethodInfo.myMethod); renameMethodProcessor.findExistingNameConflicts(renameMethodInfo.myMethod, renameMethodInfo.myNewName, conflicts, myAllRenames); } } RefactoringConflictsUtil.getInstance() .analyzeAccessibilityConflictsAfterMemberMove(myRecordCandidate.getPsiClass(), PRIVATE, conflictingFields, conflicts); if (!conflicts.isEmpty() && ApplicationManager.getApplication().isUnitTestMode()) { if (!ConflictsInTestsException.isTestIgnore()) { throw new ConflictsInTestsException(conflicts.values()); } return true; } return showConflicts(conflicts, usages); }