diff --git a/java/debugger/impl/src/com/intellij/debugger/ui/HotSwapUIImpl.java b/java/debugger/impl/src/com/intellij/debugger/ui/HotSwapUIImpl.java index 81a9583f5e9d..7dda9cd1c3c1 100644 --- a/java/debugger/impl/src/com/intellij/debugger/ui/HotSwapUIImpl.java +++ b/java/debugger/impl/src/com/intellij/debugger/ui/HotSwapUIImpl.java @@ -187,7 +187,7 @@ public final class HotSwapUIImpl extends HotSwapUI { } HotSwapProgressImpl progress = new HotSwapProgressImpl(myProject); - if (modifiedClasses.keySet().size() == 1) { + if (modifiedClasses.size() == 1) { progress.setSessionForActions(ContainerUtil.getFirstItem(modifiedClasses.keySet())); } progress.addProgressListener(delegatingTo(statusListener, sessions, progress)); diff --git a/java/idea-ui/src/com/intellij/ide/util/importProject/RootDetectionProcessor.java b/java/idea-ui/src/com/intellij/ide/util/importProject/RootDetectionProcessor.java index 773baea0e816..635ec9149ad9 100644 --- a/java/idea-ui/src/com/intellij/ide/util/importProject/RootDetectionProcessor.java +++ b/java/idea-ui/src/com/intellij/ide/util/importProject/RootDetectionProcessor.java @@ -215,7 +215,7 @@ public class RootDetectionProcessor { private List detectRoots() { Map> roots = runDetectors(); if (myProgressIndicator != null) { - myProgressIndicator.setText2(JavaUiBundle.message("progress.text.processing.0.project.roots", roots.values().size())); + myProgressIndicator.setText2(JavaUiBundle.message("progress.text.processing.0.project.roots", roots.size())); } Map rootData = new LinkedHashMap<>(); diff --git a/platform/analysis-impl/src/com/intellij/codeInspection/RedundantSuppressInspectionBase.java b/platform/analysis-impl/src/com/intellij/codeInspection/RedundantSuppressInspectionBase.java index 24490915bebd..4ae168068885 100644 --- a/platform/analysis-impl/src/com/intellij/codeInspection/RedundantSuppressInspectionBase.java +++ b/platform/analysis-impl/src/com/intellij/codeInspection/RedundantSuppressInspectionBase.java @@ -86,7 +86,7 @@ public abstract class RedundantSuppressInspectionBase extends GlobalSimpleInspec } }); - if (suppressedScopes.values().isEmpty()) return ProblemDescriptor.EMPTY_ARRAY; + if (suppressedScopes.isEmpty()) return ProblemDescriptor.EMPTY_ARRAY; // have to visit all file from scratch since inspections can be written in any pervasive way including checkFile() overriding Map, String> suppressedTools = new HashMap<>(); List> toolWrappers = getInspectionTools(psiFile, profile); diff --git a/platform/execution-impl/src/com/intellij/execution/ui/layout/impl/GridImpl.java b/platform/execution-impl/src/com/intellij/execution/ui/layout/impl/GridImpl.java index 30e7286d4127..fd205c23e257 100644 --- a/platform/execution-impl/src/com/intellij/execution/ui/layout/impl/GridImpl.java +++ b/platform/execution-impl/src/com/intellij/execution/ui/layout/impl/GridImpl.java @@ -167,7 +167,7 @@ public final class GridImpl extends Wrapper implements Grid, Disposable, UiDataP } public ActionCallback restoreLastUiState() { - final ActionCallback result = new ActionCallback(myPlaceInGrid2Cell.values().size()); + final ActionCallback result = new ActionCallback(myPlaceInGrid2Cell.size()); for (final GridCellImpl cell : myPlaceInGrid2Cell.values()) { cell.restoreLastUiState().notifyWhenDone(result); } diff --git a/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/task/ui/ExternalSystemTasksTree.java b/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/task/ui/ExternalSystemTasksTree.java index 2ea02cb1900a..b7994bfef781 100644 --- a/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/task/ui/ExternalSystemTasksTree.java +++ b/platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/task/ui/ExternalSystemTasksTree.java @@ -191,7 +191,7 @@ public class ExternalSystemTasksTree extends Tree implements Supplier> content = getFilteredContent(context, toolWrapper); - return content != null && !content.values().isEmpty(); + return content != null && !content.isEmpty(); } @Override @@ -62,7 +62,7 @@ public final class OfflineInspectionRVContentProvider extends InspectionRVConten @NotNull Function problems) { final Map> filteredContent = getFilteredContent(context, wrapper); InspectionResultsView view = context.getView(); - if (filteredContent != null && !filteredContent.values().isEmpty()) { + if (filteredContent != null && !filteredContent.isEmpty()) { buildTree(context, filteredContent, wrapper, descriptor -> { final RefEntity element = descriptor.getRefElement(context.getRefManager()); return new RefEntityContainer(element, new OfflineProblemDescriptor[] {descriptor}) { diff --git a/python/python-psi-impl/src/com/jetbrains/python/codeInsight/intentions/ImportFromToImportIntention.java b/python/python-psi-impl/src/com/jetbrains/python/codeInsight/intentions/ImportFromToImportIntention.java index 79b3b616505a..449d380d61d5 100644 --- a/python/python-psi-impl/src/com/jetbrains/python/codeInsight/intentions/ImportFromToImportIntention.java +++ b/python/python-psi-impl/src/com/jetbrains/python/codeInsight/intentions/ImportFromToImportIntention.java @@ -217,8 +217,8 @@ public final class ImportFromToImportIntention extends PyBaseIntentionAction { } while (feeler != null); String top_name = top_qualifier.getName(); Collection possible_targets = references.keySet(); - if (star_references.size() > 0) { - possible_targets = new ArrayList<>(references.keySet().size() + star_references.size()); + if (!star_references.isEmpty()) { + possible_targets = new ArrayList<>(references.size() + star_references.size()); possible_targets.addAll(references.keySet()); possible_targets.addAll(star_references); } diff --git a/python/testSrc/com/jetbrains/python/PyTypeParserTest.java b/python/testSrc/com/jetbrains/python/PyTypeParserTest.java index 85a6a3ea5fdc..f95ef0ec7e3a 100644 --- a/python/testSrc/com/jetbrains/python/PyTypeParserTest.java +++ b/python/testSrc/com/jetbrains/python/PyTypeParserTest.java @@ -108,7 +108,7 @@ public class PyTypeParserTest extends PyTestCase { myFixture.configureByFile("typeParser/typeParser.py"); final String s = "list of (MyObject, collections.Iterable of MyObject, int) or None"; PyTypeParser.ParseResult result = PyTypeParser.parse(myFixture.getFile(), s); - assertEquals(7, result.getTypes().values().size()); + assertEquals(7, result.getTypes().size()); } public void testGenericType() {