Use bounded wildcards in API in static methods to make it more conventional and flexible
authorAlexey Kudravtsev <cdr@intellij.com>
Mon, 1 Oct 2018 10:42:18 +0000 (13:42 +0300)
committerAlexey Kudravtsev <cdr@intellij.com>
Mon, 1 Oct 2018 10:44:57 +0000 (13:44 +0300)
487 files changed:
RegExpSupport/src/org/intellij/lang/regexp/UnicodeCharacterNames.java
java/compiler/impl/src/com/intellij/compiler/actions/BuildArtifactAction.java
java/compiler/impl/src/com/intellij/packaging/impl/ui/actions/PackageFileWorker.java
java/debugger/impl/src/com/intellij/debugger/impl/DebuggerUtilsEx.java
java/debugger/impl/src/com/intellij/debugger/impl/DebuggerUtilsImpl.java
java/debugger/impl/src/com/intellij/debugger/impl/HotSwapManager.java
java/debugger/impl/src/com/intellij/debugger/memory/ui/JavaTypeInfo.java
java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/Breakpoint.java
java/debugger/impl/src/com/intellij/debugger/ui/breakpoints/JavaLineBreakpointTypeBase.java
java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/CompilingEvaluatorImpl.java
java/execution/impl/src/com/intellij/execution/TestClassCollector.java
java/execution/impl/src/com/intellij/execution/testDiscovery/IntellijTestDiscoveryProducer.java
java/execution/impl/src/com/intellij/execution/testDiscovery/TestDiscoveryConfigurationProducer.java
java/execution/impl/src/com/intellij/execution/testDiscovery/TestDiscoverySearchHelper.java
java/execution/impl/src/com/intellij/execution/testDiscovery/actions/ShowAffectedTestsAction.java
java/idea-ui/src/com/intellij/ide/util/frameworkSupport/FrameworkSupportUtil.java
java/idea-ui/src/com/intellij/ide/util/importProject/ModuleInsight.java
java/idea-ui/src/com/intellij/ide/util/importProject/RootDetectionProcessor.java
java/idea-ui/src/com/intellij/jarFinder/AbstractAttachSourceProvider.java
java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/JdkComboBox.java
java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/actions/AddCompositeElementAction.java
java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/nodes/PackagingTreeNodeFactory.java
java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/artifacts/sourceItems/ModuleSourceItemGroup.java
java/idea-ui/src/com/intellij/openapi/roots/ui/configuration/libraries/AddCustomLibraryDialog.java
java/java-analysis-impl/src/com/intellij/codeInsight/daemon/impl/UnusedSymbolUtil.java
java/java-analysis-impl/src/com/intellij/codeInsight/daemon/impl/analysis/RefCountHolder.java
java/java-analysis-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/ChangeStringLiteralToCharInMethodCallFix.java
java/java-analysis-impl/src/com/intellij/codeInspection/bytecodeAnalysis/Parameters.java
java/java-analysis-impl/src/com/intellij/codeInspection/dataFlow/inliner/InlinerUtil.java
java/java-analysis-impl/src/com/intellij/codeInspection/reference/RefClassImpl.java
java/java-analysis-impl/src/com/intellij/codeInspection/util/SpecialAnnotationsUtilBase.java
java/java-analysis-impl/src/com/intellij/find/findUsages/JavaFindUsagesHelper.java
java/java-impl/src/com/intellij/codeInsight/CodeInsightUtil.java
java/java-impl/src/com/intellij/codeInsight/completion/AllClassesGetter.java
java/java-impl/src/com/intellij/codeInsight/completion/BasicExpressionCompletionContributor.java
java/java-impl/src/com/intellij/codeInsight/completion/JavaClassNameCompletionContributor.java
java/java-impl/src/com/intellij/codeInsight/completion/JavaInheritorsGetter.java
java/java-impl/src/com/intellij/codeInsight/completion/JavaSmartCompletionContributor.java
java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/CreateFromUsageUtils.java
java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/CreateMethodFromUsageFix.java
java/java-impl/src/com/intellij/codeInsight/generation/JavaOverrideImplementMemberChooser.java
java/java-impl/src/com/intellij/codeInsight/generation/OverrideImplementUtil.java
java/java-impl/src/com/intellij/codeInspection/inferNullity/InferNullityAnnotationsAction.java
java/java-impl/src/com/intellij/codeInspection/streamMigration/JoiningMigration.java
java/java-impl/src/com/intellij/codeInspection/streamToLoop/StreamToLoopInspection.java
java/java-impl/src/com/intellij/ide/util/PackageUtil.java
java/java-impl/src/com/intellij/ide/util/SuperMethodWarningUtil.java
java/java-impl/src/com/intellij/psi/filters/getters/ClassLiteralGetter.java
java/java-impl/src/com/intellij/refactoring/changeSignature/ChangeSignatureUtil.java
java/java-impl/src/com/intellij/refactoring/inline/InlineMethodProcessor.java
java/java-impl/src/com/intellij/refactoring/inlineSuperClass/InlineSuperClassRefactoringProcessor.java
java/java-impl/src/com/intellij/refactoring/introduceField/ElementToWorkOn.java
java/java-impl/src/com/intellij/refactoring/introduceParameter/Util.java
java/java-impl/src/com/intellij/refactoring/introduceVariable/IntroduceVariableBase.java
java/java-impl/src/com/intellij/refactoring/makeStatic/MakeStaticUtil.java
java/java-impl/src/com/intellij/refactoring/migration/MigrationUtil.java
java/java-impl/src/com/intellij/refactoring/move/moveClassesOrPackages/MoveClassesOrPackagesUtil.java
java/java-impl/src/com/intellij/refactoring/psi/MethodInheritanceUtils.java
java/java-impl/src/com/intellij/refactoring/rename/JavaUnresolvableLocalCollisionDetector.java
java/java-impl/src/com/intellij/refactoring/rename/RenameJavaMemberProcessor.java
java/java-impl/src/com/intellij/refactoring/util/RefactoringConflictsUtil.java
java/java-impl/src/com/intellij/refactoring/util/RefactoringHierarchyUtil.java
java/java-impl/src/com/intellij/refactoring/util/RefactoringUtil.java
java/java-impl/src/com/intellij/refactoring/util/duplicates/MethodDuplicatesHandler.java
java/java-impl/src/com/intellij/testIntegration/TestIntegrationUtils.java
java/java-impl/src/com/intellij/testIntegration/createTest/CreateTestAction.java
java/java-impl/src/com/intellij/testIntegration/createTest/JavaTestGenerator.java
java/java-impl/src/com/intellij/unscramble/ThreadDumpParser.java
java/java-indexing-api/src/com/intellij/psi/search/searches/AllClassesSearch.java
java/java-psi-api/src/com/intellij/codeInsight/AnnotationUtil.java
java/java-psi-api/src/com/intellij/patterns/PsiJavaElementPattern.java
java/java-psi-api/src/com/intellij/psi/PsiMethodReferenceUtil.java
java/java-psi-api/src/com/intellij/psi/augment/PsiAugmentProvider.java
java/java-psi-api/src/com/intellij/psi/util/InheritanceUtil.java
java/java-psi-api/src/com/intellij/psi/util/PsiConcatenationUtil.java
java/java-psi-api/src/com/intellij/util/JavaPsiConstructorUtil.java
java/java-psi-impl/src/com/intellij/codeInsight/ExceptionUtil.java
java/java-psi-impl/src/com/intellij/psi/NonClasspathClassFinder.java
java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/graphInference/InferenceVariablesOrder.java
java/jsp-spi/src/com/intellij/psi/jsp/JspSpiUtil.java
java/typeMigration/src/com/intellij/refactoring/typeMigration/rules/guava/FluentIterableConversionUtil.java
jps/jps-builders-6/src/org/jetbrains/jps/javac/JavacMain.java
jps/jps-builders-6/src/org/jetbrains/jps/javac/JavacProtoUtil.java
jps/jps-builders/src/org/jetbrains/jps/backwardRefs/BackwardReferenceIndexUtil.java
jps/jps-builders/src/org/jetbrains/jps/builders/java/JavaBuilderUtil.java
jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/Callbacks.java
jps/jps-builders/src/org/jetbrains/jps/builders/java/dependencyView/RW.java
jps/jps-builders/src/org/jetbrains/jps/cmdline/ClasspathBootstrap.java
jps/jps-builders/src/org/jetbrains/jps/incremental/BuildOperations.java
jps/jps-builders/src/org/jetbrains/jps/incremental/FSOperations.java
jps/jps-builders/src/org/jetbrains/jps/incremental/IncProjectBuilder.java
jps/jps-builders/src/org/jetbrains/jps/incremental/instrumentation/ClassProcessingBuilder.java
jps/jps-builders/src/org/jetbrains/jps/incremental/java/JavaBuilder.java
jps/model-impl/src/org/jetbrains/jps/model/java/impl/JpsJavaDependenciesEnumerationHandler.java
jps/model-serialization/src/org/jetbrains/jps/model/serialization/JpsProjectLoader.java
json/src/com/jetbrains/jsonSchema/impl/CachedValueProviderOnPsiFile.java
json/src/com/jetbrains/jsonSchema/impl/JsonSchemaConflictNotificationProvider.java
jvm/jvm-analysis-tests-api/src/com/intellij/codeInspection/tests/JvmAnalysisTestsUastUtil.java
jvm/jvm-analysis-tests-api/src/com/intellij/codeInspection/tests/UastCallMatcherTestBase.java
platform/analysis-impl/src/com/intellij/codeInsight/daemon/impl/DaemonCodeAnalyzerEx.java
platform/analysis-impl/src/com/intellij/codeInsight/daemon/impl/HighlightInfo.java
platform/analysis-impl/src/com/intellij/codeInsight/daemon/impl/UpdateHighlightersUtil.java
platform/analysis-impl/src/com/intellij/codeInspection/ex/InspectionToolRegistrar.java
platform/core-api/src/com/intellij/codeInsight/PsiEquivalenceUtil.java
platform/core-api/src/com/intellij/openapi/command/WriteCommandAction.java
platform/core-api/src/com/intellij/openapi/components/ServiceManager.java
platform/core-api/src/com/intellij/openapi/util/ClassExtension.java
platform/core-api/src/com/intellij/openapi/vfs/VfsUtilCore.java
platform/core-api/src/com/intellij/patterns/StandardPatterns.java
platform/core-api/src/com/intellij/psi/ElementManipulators.java
platform/core-api/src/com/intellij/psi/util/PsiCacheKey.java
platform/core-api/src/com/intellij/psi/util/PsiTreeUtil.java
platform/core-api/src/com/intellij/util/FileContentUtilCore.java
platform/core-impl/src/com/intellij/psi/impl/source/tree/LightTreeUtil.java
platform/diff-api/src/com/intellij/diff/util/ThreeSide.java
platform/diff-impl/src/com/intellij/diff/applications/DiffApplicationBase.java
platform/diff-impl/src/com/intellij/diff/comparison/ByLine.java
platform/diff-impl/src/com/intellij/diff/comparison/ChangeCorrector.java
platform/diff-impl/src/com/intellij/diff/comparison/ChunkOptimizer.java
platform/diff-impl/src/com/intellij/diff/comparison/ComparisonManagerImpl.java
platform/diff-impl/src/com/intellij/diff/comparison/iterables/DiffIterableUtil.java
platform/diff-impl/src/com/intellij/diff/tools/util/FoldingModelSupport.java
platform/diff-impl/src/com/intellij/diff/tools/util/base/TextDiffViewerUtil.java
platform/diff-impl/src/com/intellij/diff/tools/util/text/SimpleTextDiffProvider.java
platform/diff-impl/src/com/intellij/diff/util/DiffDrawUtil.java
platform/diff-impl/src/com/intellij/diff/util/DiffUtil.java
platform/duplicates-analysis/src/com/intellij/dupLocator/DuplicatesProfile.java
platform/duplicates-analysis/src/com/intellij/dupLocator/treeHash/DuplocatorHashCallback.java
platform/dvcs-impl/src/com/intellij/dvcs/DvcsUtil.java
platform/dvcs-impl/src/com/intellij/dvcs/actions/DvcsQuickListContentProvider.java
platform/dvcs-impl/src/com/intellij/dvcs/branch/DvcsBranchUtil.java
platform/editor-ui-ex/src/com/intellij/openapi/editor/colors/impl/EditorColorsSchemeImpl.java
platform/editor-ui-ex/src/com/intellij/psi/impl/search/PsiTodoSearchHelperImpl.java
platform/external-system-api/src/com/intellij/openapi/externalSystem/util/ExternalSystemApiUtil.java
platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/internal/ExternalSystemExecuteTaskTask.java
platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/project/manage/ContentRootDataService.java
platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/project/manage/ExternalProjectsDataStorage.java
platform/external-system-impl/src/com/intellij/openapi/externalSystem/service/project/manage/ExternalSystemKeymapExtension.java
platform/external-system-impl/src/com/intellij/openapi/externalSystem/view/ExternalSystemViewDefaultContributor.java
platform/indexing-api/src/com/intellij/psi/search/searches/ReferencesSearch.java
platform/indexing-api/src/com/intellij/util/indexing/FileBasedIndex.java
platform/indexing-impl/src/com/intellij/psi/search/FileTypeIndex.java
platform/indexing-impl/src/com/intellij/psi/stubs/StubProcessingHelperBase.java
platform/lang-api/src/com/intellij/psi/codeStyle/arrangement/std/StdArrangementExtendableSettings.java
platform/lang-api/src/com/intellij/util/FileContentUtil.java
platform/lang-impl/src/com/intellij/analysis/dialog/ModelScopeItemPresenter.java
platform/lang-impl/src/com/intellij/application/options/ImportSchemeChooserDialog.java
platform/lang-impl/src/com/intellij/application/options/codeStyle/OptionTableWithPreviewPanel.java
platform/lang-impl/src/com/intellij/application/options/codeStyle/arrangement/match/ArrangementSectionRulesControl.java
platform/lang-impl/src/com/intellij/application/options/colors/ColorSettingsUtil.java
platform/lang-impl/src/com/intellij/build/BuildTreeConsoleView.java
platform/lang-impl/src/com/intellij/codeInsight/completion/CompletionLookupArrangerImpl.java
platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/CodeFoldingPass.java
platform/lang-impl/src/com/intellij/codeInsight/editorActions/SelectWordUtil.java
platform/lang-impl/src/com/intellij/codeInsight/folding/impl/AbstractElementSignatureProvider.java
platform/lang-impl/src/com/intellij/codeInsight/highlighting/HighlightUsagesHandler.java
platform/lang-impl/src/com/intellij/codeInsight/hint/ImplementationViewComponent.java
platform/lang-impl/src/com/intellij/codeInsight/navigation/DocPreviewUtil.java
platform/lang-impl/src/com/intellij/codeInsight/navigation/MethodUpDownUtil.java
platform/lang-impl/src/com/intellij/codeInsight/navigation/NavigationUtil.java
platform/lang-impl/src/com/intellij/codeInsight/navigation/actions/GotoDeclarationAction.java
platform/lang-impl/src/com/intellij/codeInsight/template/impl/InvokeTemplateAction.java
platform/lang-impl/src/com/intellij/codeInsight/template/impl/ListTemplatesHandler.java
platform/lang-impl/src/com/intellij/codeInsight/template/impl/LiveTemplateCompletionContributor.java
platform/lang-impl/src/com/intellij/codeInsight/template/impl/TemplateManagerImpl.java
platform/lang-impl/src/com/intellij/codeInsight/template/postfix/templates/PostfixTemplatesUtils.java
platform/lang-impl/src/com/intellij/codeInsight/unwrap/RangeSplitter.java
platform/lang-impl/src/com/intellij/conversion/impl/ModuleSettingsImpl.java
platform/lang-impl/src/com/intellij/execution/ExecutionHelper.java
platform/lang-impl/src/com/intellij/execution/actions/ChooseRunConfigurationPopup.java
platform/lang-impl/src/com/intellij/execution/compound/ConfigurationSelectionUtil.java
platform/lang-impl/src/com/intellij/execution/console/LanguageConsoleBuilder.java
platform/lang-impl/src/com/intellij/execution/runners/AbstractConsoleRunnerWithHistory.java
platform/lang-impl/src/com/intellij/execution/ui/RunContentManagerImpl.java
platform/lang-impl/src/com/intellij/facet/impl/FacetModelBase.java
platform/lang-impl/src/com/intellij/find/actions/FindUsagesAction.java
platform/lang-impl/src/com/intellij/find/findUsages/FindUsagesManager.java
platform/lang-impl/src/com/intellij/find/impl/FindInProjectUtil.java
platform/lang-impl/src/com/intellij/formatting/engine/ApplyChangesState.java
platform/lang-impl/src/com/intellij/formatting/engine/ExpandChildrenIndentState.java
platform/lang-impl/src/com/intellij/formatting/templateLanguages/BlockUtil.java
platform/lang-impl/src/com/intellij/framework/detection/impl/FrameworkDetectionUtil.java
platform/lang-impl/src/com/intellij/ide/actions/CopyReferenceAction.java
platform/lang-impl/src/com/intellij/ide/actions/SelectInAction.java
platform/lang-impl/src/com/intellij/ide/favoritesTreeView/FavoritesListNode.java
platform/lang-impl/src/com/intellij/ide/favoritesTreeView/FavoritesManager.java
platform/lang-impl/src/com/intellij/ide/favoritesTreeView/actions/AddToFavoritesAction.java
platform/lang-impl/src/com/intellij/ide/highlighter/custom/impl/CustomFileTypeFoldingBuilder.java
platform/lang-impl/src/com/intellij/ide/impl/PatchProjectUtil.java
platform/lang-impl/src/com/intellij/ide/impl/convert/JDomConvertingUtil.java
platform/lang-impl/src/com/intellij/ide/projectView/impl/FileNestingBuilder.java
platform/lang-impl/src/com/intellij/ide/projectView/impl/nodes/LibraryGroupNode.java
platform/lang-impl/src/com/intellij/ide/scratch/LRUPopupBuilder.java
platform/lang-impl/src/com/intellij/ide/structureView/impl/TemplateLanguageStructureViewBuilder.java
platform/lang-impl/src/com/intellij/ide/util/PlatformPackageUtil.java
platform/lang-impl/src/com/intellij/openapi/projectRoots/impl/SdkConfigurationUtil.java
platform/lang-impl/src/com/intellij/openapi/roots/impl/PushedFilePropertiesUpdaterImpl.java
platform/lang-impl/src/com/intellij/openapi/roots/libraries/ui/impl/RootDetectionUtil.java
platform/lang-impl/src/com/intellij/openapi/roots/ui/configuration/actions/ModuleDeleteProvider.java
platform/lang-impl/src/com/intellij/platform/templates/github/DownloadUtil.java
platform/lang-impl/src/com/intellij/platform/templates/github/ZipUtil.java
platform/lang-impl/src/com/intellij/psi/codeStyle/arrangement/engine/ArrangementEngine.java
platform/lang-impl/src/com/intellij/psi/codeStyle/extractor/ui/CodeStyleSettingsNameProvider.java
platform/lang-impl/src/com/intellij/psi/impl/source/codeStyle/SemanticEditorPosition.java
platform/lang-impl/src/com/intellij/psi/util/proximity/PsiProximityComparator.java
platform/lang-impl/src/com/intellij/refactoring/IntroduceTargetChooser.java
platform/lang-impl/src/com/intellij/refactoring/extractMethod/ExtractMethodHelper.java
platform/lang-impl/src/com/intellij/refactoring/inline/InlineOptionsDialog.java
platform/lang-impl/src/com/intellij/refactoring/move/moveFilesOrDirectories/MoveFilesOrDirectoriesProcessor.java
platform/lang-impl/src/com/intellij/refactoring/rename/RenameUtil.java
platform/lang-impl/src/com/intellij/refactoring/safeDelete/SafeDeleteProcessor.java
platform/lang-impl/src/com/intellij/refactoring/util/TextOccurrencesUtil.java
platform/lang-impl/src/com/intellij/task/impl/ProjectTaskManagerImpl.java
platform/lang-impl/src/com/intellij/testIntegration/TestFinderHelper.java
platform/lvcs-impl/src/com/intellij/history/integration/patches/PatchCreator.java
platform/platform-api/src/com/intellij/ide/util/treeView/TreeState.java
platform/platform-api/src/com/intellij/notification/NotificationAction.java
platform/platform-api/src/com/intellij/openapi/editor/EditorModificationUtil.java
platform/platform-api/src/com/intellij/openapi/fileChooser/FileChooser.java
platform/platform-api/src/com/intellij/openapi/fileEditor/PsiElementNavigatable.java
platform/platform-api/src/com/intellij/openapi/options/SimpleConfigurable.java
platform/platform-api/src/com/intellij/openapi/project/DumbAwareAction.java
platform/platform-api/src/com/intellij/openapi/ui/Messages.java
platform/platform-api/src/com/intellij/openapi/vfs/VfsUtil.java
platform/platform-api/src/com/intellij/psi/statistics/StatisticsInfo.java
platform/platform-api/src/com/intellij/ui/CheckboxTreeHelper.java
platform/platform-api/src/com/intellij/ui/components/JBList.java
platform/platform-api/src/com/intellij/ui/speedSearch/ListWithFilter.java
platform/platform-api/src/com/intellij/ui/speedSearch/SpeedSearchUtil.java
platform/platform-api/src/com/intellij/util/net/HttpConfigurable.java
platform/platform-api/src/com/intellij/util/ui/tree/TreeUtil.java
platform/platform-impl/src/com/intellij/application/options/schemes/SchemeNameGenerator.java
platform/platform-impl/src/com/intellij/codeInsight/editorActions/TextBlockTransferable.java
platform/platform-impl/src/com/intellij/designer/propertyTable/PropertyTable.java
platform/platform-impl/src/com/intellij/execution/impl/EditorHyperlinkSupport.java
platform/platform-impl/src/com/intellij/execution/process/ScriptRunnerUtil.java
platform/platform-impl/src/com/intellij/ide/dnd/LinuxDragAndDropSupport.java
platform/platform-impl/src/com/intellij/ide/gdpr/ConsentOptions.java
platform/platform-impl/src/com/intellij/ide/plugins/PluginInstaller.java
platform/platform-impl/src/com/intellij/ide/plugins/PluginManagerConfigurableNew.java
platform/platform-impl/src/com/intellij/ide/plugins/PluginManagerMain.java
platform/platform-impl/src/com/intellij/ide/plugins/newui/DetailsPagePluginComponent.java
platform/platform-impl/src/com/intellij/ide/plugins/newui/PluginsGroup.java
platform/platform-impl/src/com/intellij/ide/startup/impl/StartupManagerImpl.java
platform/platform-impl/src/com/intellij/ide/ui/customization/CustomizationUtil.java
platform/platform-impl/src/com/intellij/ide/ui/search/SearchUtil.java
platform/platform-impl/src/com/intellij/internal/statistic/collectors/fus/actions/persistence/MainMenuCollector.java
platform/platform-impl/src/com/intellij/notification/EventLog.java
platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/Utils.java
platform/platform-impl/src/com/intellij/openapi/diff/impl/mergeTool/MergeVersion.java
platform/platform-impl/src/com/intellij/openapi/diff/impl/splitter/DividerPolygon.java
platform/platform-impl/src/com/intellij/openapi/diff/impl/splitter/LineBlocks.java
platform/platform-impl/src/com/intellij/openapi/diff/impl/util/FontSizeSynchronizer.java
platform/platform-impl/src/com/intellij/openapi/editor/ex/util/EditorUtil.java
platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorCopyPasteHelperImpl.java
platform/platform-impl/src/com/intellij/openapi/editor/impl/InlayModelImpl.java
platform/platform-impl/src/com/intellij/openapi/editor/impl/view/EditorPainter.java
platform/platform-impl/src/com/intellij/openapi/fileChooser/impl/FileChooserUtil.java
platform/platform-impl/src/com/intellij/openapi/keymap/impl/ui/ActionsTreeUtil.java
platform/platform-impl/src/com/intellij/openapi/progress/util/BackgroundTaskUtil.java
platform/platform-impl/src/com/intellij/openapi/updateSettings/impl/pluginsAdvertisement/PluginsAdvertiser.java
platform/platform-impl/src/com/intellij/openapi/vfs/newvfs/VfsImplUtil.java
platform/platform-impl/src/com/intellij/openapi/wm/impl/ColorThief.java
platform/platform-impl/src/com/intellij/openapi/wm/impl/status/InlineProgressIndicator.java
platform/platform-impl/src/com/intellij/packageDependencies/ui/TreeExpansionMonitor.java
platform/platform-impl/src/com/intellij/patterns/compiler/PatternCompilerImpl.java
platform/platform-impl/src/com/intellij/ui/mac/touchbar/BuildUtils.java
platform/platform-impl/src/com/intellij/ui/mac/touchbar/TouchBarsManager.java
platform/platform-impl/src/com/intellij/ui/popup/ActionPopupStep.java
platform/platform-impl/src/com/intellij/ui/tree/TreeSmartSelectProvider.java
platform/platform-impl/src/com/intellij/ui/tree/project/ProjectFileTreeModel.java
platform/platform-impl/src/com/intellij/util/ui/ListItemsDialogWrapper.java
platform/platform-impl/src/com/intellij/util/ui/SwingHelper.java
platform/platform-impl/src/org/jetbrains/io/BuiltInServer.java
platform/projectModel-api/src/com/intellij/openapi/module/ModuleUtilCore.java
platform/projectModel-api/src/com/intellij/openapi/roots/ModuleRootModificationUtil.java
platform/projectModel-api/src/com/intellij/openapi/roots/libraries/LibraryUtil.java
platform/projectModel-impl/src/com/intellij/openapi/roots/SyntheticLibrary.java
platform/script-debugger/debugger-ui/src/org/jetbrains/debugger/PsiVisitors.java
platform/script-debugger/protocol/protocol-reader-runtime/src/org/jetbrains/jsonProtocol/JsonReaders.java
platform/smRunner/src/com/intellij/execution/testframework/sm/TestsLocationProviderUtil.java
platform/smRunner/src/com/intellij/execution/testframework/sm/runner/history/ImportTestOutputExtension.java
platform/smRunner/src/com/intellij/execution/testframework/sm/runner/history/ImportedToGeneralTestEventsConverter.java
platform/structuralsearch/source/com/intellij/structuralsearch/plugin/ui/UIUtil.java
platform/structure-view-impl/src/com/intellij/ide/structureView/customRegions/CustomRegionStructureUtil.java
platform/tasks-platform-impl/src/com/intellij/tasks/impl/TaskUtil.java
platform/testFramework/src/com/intellij/testFramework/UsefulTestCase.java
platform/testGuiFramework/src/com/intellij/testGuiFramework/fixtures/IdeaDialogFixture.java
platform/testRunner/src/com/intellij/execution/testframework/TrackRunningTestUtil.java
platform/testRunner/src/com/intellij/execution/testframework/actions/ViewAssertEqualsDiffAction.java
platform/usageView/src/com/intellij/usages/ChunkExtractor.java
platform/usageView/src/com/intellij/usages/UsageInfoToUsageConverter.java
platform/usageView/src/com/intellij/usages/impl/GroupNode.java
platform/util-rt/src/com/intellij/openapi/util/Conditions.java
platform/util-rt/src/com/intellij/openapi/util/io/DataInputOutputUtilRt.java
platform/util-rt/src/com/intellij/util/containers/ContainerUtilRt.java
platform/util-rt/src/com/intellij/util/containers/Stack.java
platform/util/src/com/intellij/openapi/diff/impl/fragments/FragmentListImpl.java
platform/util/src/com/intellij/openapi/util/AtomicNotNullLazyValue.java
platform/util/src/com/intellij/openapi/util/AtomicNullableLazyValue.java
platform/util/src/com/intellij/openapi/util/JDOMUtil.java
platform/util/src/com/intellij/openapi/util/NotNullLazyKey.java
platform/util/src/com/intellij/openapi/util/NotNullLazyValue.java
platform/util/src/com/intellij/openapi/util/NullableLazyKey.java
platform/util/src/com/intellij/openapi/util/NullableLazyValue.java
platform/util/src/com/intellij/openapi/util/VolatileNotNullLazyValue.java
platform/util/src/com/intellij/openapi/util/VolatileNullableLazyValue.java
platform/util/src/com/intellij/openapi/util/io/FileUtil.java
platform/util/src/com/intellij/openapi/util/text/StringUtil.java
platform/util/src/com/intellij/util/ArrayUtil.java
platform/util/src/com/intellij/util/ConcurrencyUtil.java
platform/util/src/com/intellij/util/ObjectUtils.java
platform/util/src/com/intellij/util/containers/ConcurrentFactoryMap.java
platform/util/src/com/intellij/util/containers/ContainerUtil.java
platform/util/src/com/intellij/util/containers/ConvertingIterator.java
platform/util/src/com/intellij/util/containers/FactoryMap.java
platform/util/src/com/intellij/util/containers/JBIterable.java
platform/util/src/com/intellij/util/containers/SequenceIterator.java
platform/util/src/com/intellij/util/containers/TreeTraversal.java
platform/util/src/com/intellij/util/io/ZipUtil.java
platform/util/src/com/intellij/util/messages/impl/MessageBusImpl.java
platform/util/src/com/intellij/util/text/TextRangeUtil.java
platform/util/src/com/intellij/util/text/UniqueNameGenerator.java
platform/util/src/com/intellij/util/ui/UIUtil.java
platform/vcs-api/src/com/intellij/openapi/vcs/changes/ChangesUtil.java
platform/vcs-api/src/com/intellij/openapi/vcs/diff/DiffProviderEx.java
platform/vcs-api/src/com/intellij/openapi/vcs/impl/ContentRevisionCache.java
platform/vcs-api/src/com/intellij/openapi/vcs/update/FileGroup.java
platform/vcs-api/src/com/intellij/vcsUtil/VcsUtil.java
platform/vcs-api/vcs-api-core/src/com/intellij/openapi/diff/impl/patch/UnifiedDiffWriter.java
platform/vcs-impl/src/com/intellij/openapi/diff/impl/patch/IdeaTextPatchBuilder.java
platform/vcs-impl/src/com/intellij/openapi/diff/impl/patch/SelectFilesToAddTextsToPatchPanel.java
platform/vcs-impl/src/com/intellij/openapi/diff/impl/patch/formove/PathMerger.java
platform/vcs-impl/src/com/intellij/openapi/vcs/ObjectsConvertor.java
platform/vcs-impl/src/com/intellij/openapi/vcs/actions/CompareWithSelectedRevisionAction.java
platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ChangesPreprocess.java
platform/vcs-impl/src/com/intellij/openapi/vcs/changes/actions/EditAction.java
platform/vcs-impl/src/com/intellij/openapi/vcs/changes/actions/MoveChangesToAnotherListAction.java
platform/vcs-impl/src/com/intellij/openapi/vcs/changes/actions/diff/ShowDiffAction.java
platform/vcs-impl/src/com/intellij/openapi/vcs/changes/committed/CommittedChangesTreeBrowser.java
platform/vcs-impl/src/com/intellij/openapi/vcs/changes/issueLinks/IssueLinkHtmlRenderer.java
platform/vcs-impl/src/com/intellij/openapi/vcs/changes/patch/AppliedTextPatch.java
platform/vcs-impl/src/com/intellij/openapi/vcs/changes/patch/ApplyPatchAction.java
platform/vcs-impl/src/com/intellij/openapi/vcs/changes/patch/ApplyPatchDefaultExecutor.java
platform/vcs-impl/src/com/intellij/openapi/vcs/changes/patch/BinaryPatchWriter.java
platform/vcs-impl/src/com/intellij/openapi/vcs/changes/patch/PatchWriter.java
platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelfFileProcessorUtil.java
platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangeDiffRequestChain.java
platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/CommitChangeListDialog.java
platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/CommitHelper.java
platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/RollbackChangesDialog.java
platform/vcs-impl/src/com/intellij/openapi/vcs/checkin/CheckinHandlerUtil.java
platform/vcs-impl/src/com/intellij/openapi/vcs/history/VcsDiffUtil.java
platform/vcs-impl/src/com/intellij/openapi/vcs/impl/CollectionsDelta.java
platform/vcs-impl/src/com/intellij/openapi/vcs/impl/PartialChangesUtil.java
platform/vcs-impl/src/com/intellij/openapi/vcs/roots/VcsIntegrationEnabler.java
platform/vcs-impl/src/com/intellij/openapi/vcs/roots/VcsRootScanner.java
platform/vcs-impl/src/com/intellij/openapi/vcs/update/RefreshVFsSynchronously.java
platform/vcs-impl/src/com/intellij/openapi/vcs/update/ShowUpdatedDiffActionProvider.java
platform/vcs-impl/src/com/intellij/vcsUtil/RollbackUtil.java
platform/vcs-impl/src/com/intellij/vcsUtil/VcsFileUtil.java
platform/vcs-log/api/src/com/intellij/vcs/log/VcsCommitStyleFactory.java
platform/vcs-log/graph/src/com/intellij/vcs/log/graph/impl/permanent/GraphLayoutBuilder.java
platform/vcs-log/impl/src/com/intellij/vcs/log/history/FileHistoryUtil.java
platform/vcs-log/impl/src/com/intellij/vcs/log/impl/SimpleRefGroup.java
platform/vcs-log/impl/src/com/intellij/vcs/log/impl/VcsLogContentUtil.java
platform/vcs-log/impl/src/com/intellij/vcs/log/impl/VcsLogManager.java
platform/vcs-log/impl/src/com/intellij/vcs/log/ui/frame/CommitPresentationUtil.java
platform/vcs-log/impl/src/com/intellij/vcs/log/ui/render/LabelPainter.java
platform/vcs-log/impl/src/com/intellij/vcs/log/util/TroveUtil.java
platform/vcs-log/impl/src/com/intellij/vcs/log/util/VcsLogUtil.java
platform/vcs-tests/src/com/intellij/openapi/vcs/VcsTestUtil.java
platform/vcs-tests/src/com/intellij/testFramework/vcs/AbstractVcsTestCase.java
platform/xdebugger-impl/src/com/intellij/xdebugger/impl/XDebuggerUtilImpl.java
platform/xdebugger-impl/src/com/intellij/xdebugger/impl/actions/AttachToProcessAction.java
platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/ui/BreakpointChooser.java
platform/xdebugger-impl/src/com/intellij/xdebugger/impl/frame/actions/XWatchesTreeActionBase.java
platform/xdebugger-impl/src/com/intellij/xdebugger/impl/ui/DebuggerUIUtil.java
plugins/InspectionGadgets/InspectionGadgetsAnalysis/src/com/siyeh/ig/psiutils/VariableAccessUtils.java
plugins/IntelliLang/src/org/intellij/plugins/intelliLang/inject/InjectorUtils.java
plugins/ant/jps-plugin/src/org/jetbrains/jps/ant/model/impl/JpsAntInstallationImpl.java
plugins/ant/src/com/intellij/lang/ant/config/execution/PathUtilEx.java
plugins/ant/src/com/intellij/lang/ant/dom/AntReferenceInjector.java
plugins/copyright/src/com/maddyhome/idea/copyright/options/ExternalOptionHelper.java
plugins/devkit/devkit-core/src/build/PluginBuildUtil.java
plugins/devkit/devkit-core/src/build/PrepareToDeployAction.java
plugins/devkit/devkit-core/src/dom/impl/ExtensionDomExtender.java
plugins/devkit/devkit-core/src/inspections/quickfix/PluginDescriptorChooser.java
plugins/devkit/devkit-core/src/util/ExtensionLocator.java
plugins/devkit/devkit-core/src/util/ExtensionPointLocator.java
plugins/editorconfig/src/org/editorconfig/Utils.java
plugins/git4idea/src/git4idea/GitUtil.java
plugins/git4idea/src/git4idea/util/GitUIUtil.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/lang/psi/impl/GrTraitType.java
plugins/groovy/groovy-psi/src/org/jetbrains/plugins/groovy/util/GroovyOverrideImplementExploreUtil.java
plugins/groovy/src/org/jetbrains/plugins/groovy/compiler/GroovyCompilerConfigurable.java
plugins/groovy/src/org/jetbrains/plugins/groovy/console/GroovyConsole.java
plugins/groovy/src/org/jetbrains/plugins/groovy/lang/completion/ClosureCompleter.java
plugins/groovy/src/org/jetbrains/plugins/groovy/lang/completion/GrMainCompletionProvider.java
plugins/groovy/src/org/jetbrains/plugins/groovy/lang/completion/GroovyCompletionUtil.java
plugins/groovy/src/org/jetbrains/plugins/groovy/lang/completion/GroovySmartCompletionContributor.java
plugins/groovy/src/org/jetbrains/plugins/groovy/mvc/MvcFramework.java
plugins/groovy/src/org/jetbrains/plugins/groovy/mvc/MvcModuleStructureUtil.java
plugins/groovy/src/org/jetbrains/plugins/groovy/mvc/util/MvcTargetDialogCompletionUtils.java
plugins/groovy/src/org/jetbrains/plugins/groovy/refactoring/GrRefactoringConflictsUtil.java
plugins/groovy/src/org/jetbrains/plugins/groovy/refactoring/GroovyRefactoringUtil.java
plugins/groovy/src/org/jetbrains/plugins/groovy/refactoring/inline/GroovyInlineMethodUtil.java
plugins/groovy/src/org/jetbrains/plugins/groovy/refactoring/memberPullUp/GrPullUpHelper.java
plugins/groovy/src/org/jetbrains/plugins/groovy/refactoring/rename/RenameAliasedUsagesUtil.java
plugins/groovy/src/org/jetbrains/plugins/groovy/refactoring/ui/MethodOrClosureScopeChooser.java
plugins/groovy/src/org/jetbrains/plugins/groovy/testIntegration/GroovyTestGenerator.java
plugins/groovy/structuralsearch-groovy/src/com/intellij/structuralsearch/IdeaOpenApiNonCodeMembersContributor.java
plugins/hg4idea/src/org/zmlx/hg4idea/action/HgActionUtil.java
plugins/hg4idea/src/org/zmlx/hg4idea/branch/HgBranchUtil.java
plugins/hg4idea/src/org/zmlx/hg4idea/branch/HgCommonBranchActions.java
plugins/hg4idea/src/org/zmlx/hg4idea/command/HgBookmarkCommand.java
plugins/hg4idea/src/org/zmlx/hg4idea/command/HgUpdateCommand.java
plugins/hg4idea/src/org/zmlx/hg4idea/log/HgHistoryUtil.java
plugins/hg4idea/src/org/zmlx/hg4idea/util/HgUtil.java
plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/main/ClassWriter.java
plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/DecHelper.java
plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/ExprProcessor.java
plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/IfHelper.java
plugins/java-decompiler/engine/src/org/jetbrains/java/decompiler/modules/decompiler/StrongConnectivityHelper.java
plugins/javaFX/src/org/jetbrains/plugins/javaFX/fxml/JavaFxPsiUtil.java
plugins/javaFX/src/org/jetbrains/plugins/javaFX/fxml/descriptors/JavaFxClassTagDescriptorBase.java
plugins/maven/maven-server-api/src/org/jetbrains/idea/maven/model/MavenProjectProblem.java
plugins/maven/maven2-server-impl/src/org/jetbrains/idea/maven/server/embedder/Maven2ModelConverter.java
plugins/maven/maven3-server-common/src/org/jetbrains/idea/maven/server/MavenModelConverter.java
plugins/maven/maven3-server-impl/src/org/jetbrains/idea/maven/server/Maven3AetherModelConverter.java
plugins/maven/maven30-server-impl/src/org/jetbrains/idea/maven/server/Maven30AetherModelConverter.java
plugins/maven/src/main/java/org/jetbrains/idea/maven/dom/MavenDomProjectProcessorUtils.java
plugins/maven/src/main/java/org/jetbrains/idea/maven/dom/generate/GenerateDependencyUtil.java
plugins/maven/src/main/java/org/jetbrains/idea/maven/dom/refactorings/extract/ExtractManagedDependenciesAction.java
plugins/maven/src/main/java/org/jetbrains/idea/maven/dom/references/MavenPropertyPsiReference.java
plugins/maven/src/main/java/org/jetbrains/idea/maven/execution/MavenSelectProjectPopup.java
plugins/maven/src/main/java/org/jetbrains/idea/maven/plugins/api/MavenModelPropertiesPatcher.java
plugins/maven/src/main/java/org/jetbrains/idea/maven/plugins/api/MavenPluginDescriptor.java
plugins/maven/src/main/java/org/jetbrains/idea/maven/project/MavenArtifactIndex.java
plugins/maven/src/main/java/org/jetbrains/idea/maven/tasks/MavenKeymapExtension.java
plugins/maven/src/main/java/org/jetbrains/idea/maven/utils/ComboBoxUtil.java
plugins/maven/src/main/java/org/jetbrains/idea/maven/utils/MavenUIUtil.java
plugins/maven/src/main/java/org/jetbrains/idea/maven/utils/MavenUtil.java
plugins/maven/src/main/java/org/jetbrains/idea/maven/utils/library/RepositoryAttachHandler.java
plugins/properties/src/com/intellij/lang/properties/references/CreatePropertyFix.java
plugins/stream-debugger/src/com/intellij/debugger/streams/wrapper/TraceUtil.java
plugins/svn4idea/src/org/jetbrains/idea/svn/FilePathUtil.java
plugins/svn4idea/src/org/jetbrains/idea/svn/actions/ShowPropertiesDiffAction.java
plugins/svn4idea/src/org/jetbrains/idea/svn/commandLine/CommandUtil.java
plugins/tasks/tasks-core/src/com/intellij/tasks/generic/GenericRepositoryUtil.java
plugins/tasks/tasks-core/src/com/intellij/tasks/impl/TaskStateCombo.java
plugins/terminal/src/org/jetbrains/plugins/terminal/JBTabbedTerminalWidget.java
plugins/ui-designer-core/src/com/intellij/designer/designSurface/DesignerEditorPanel.java
plugins/ui-designer-core/src/com/intellij/designer/model/RadComponent.java
plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/context/functions/AbstractFunctionContext.java
plugins/xpath/xpath-lang/src/org/intellij/lang/xpath/xslt/impl/XsltIncludeIndex.java
plugins/xpath/xpath-view/src/org/intellij/plugins/xpathView/util/Copyable.java
plugins/xslt-debugger/engine/src/org/intellij/plugins/xsltDebugger/rt/engine/remote/RemoteBreakpointImpl.java
plugins/xslt-debugger/engine/src/org/intellij/plugins/xsltDebugger/rt/engine/remote/RemoteDebuggerClient.java
plugins/xslt-debugger/engine/src/org/intellij/plugins/xsltDebugger/rt/engine/remote/RemoteVariableImpl.java
plugins/yaml/src/org/jetbrains/yaml/folding/YAMLFoldingBuilder.java
plugins/yaml/src/org/jetbrains/yaml/psi/impl/YAMLScalarImpl.java
python/psi-api/src/com/jetbrains/python/psi/impl/PyPsiUtils.java
python/psi-api/src/com/jetbrains/python/psi/types/PyClassMembersProviderBase.java
python/src/com/jetbrains/python/actions/PyExecuteSelectionAction.java
python/src/com/jetbrains/python/codeInsight/PythonFormattedStringReferenceProvider.java
python/src/com/jetbrains/python/codeInsight/completion/PyMetaClassCompletionContributor.java
python/src/com/jetbrains/python/codeInsight/controlflow/InstructionBuilder.java
python/src/com/jetbrains/python/codeInsight/intentions/DeclarationConflictChecker.java
python/src/com/jetbrains/python/debugger/PyLineBreakpointType.java
python/src/com/jetbrains/python/documentation/DocumentationBuilderKit.java
python/src/com/jetbrains/python/documentation/PythonDocumentationProvider.java
python/src/com/jetbrains/python/inspections/PyStringFormatParser.java
python/src/com/jetbrains/toolWindowWithActions/WindowWithActions.java
spellchecker/src/com/intellij/spellchecker/inspections/BaseSplitter.java
updater/src/com/intellij/updater/PatchFileCreator.java
updater/src/com/intellij/updater/Utils.java
xml/dom-impl/src/com/intellij/codeInsight/navigation/NavigationGutterIconBuilder.java
xml/impl/src/com/intellij/codeInsight/completion/TagNameReferenceCompletionProvider.java
xml/impl/src/com/intellij/codeInsight/editorActions/moveUpDown/XmlMover.java
xml/relaxng/src/org/intellij/plugins/relaxNG/inspections/BaseInspection.java
xml/relaxng/src/org/intellij/plugins/relaxNG/model/annotation/OverridingDefineRenderer.java
xml/relaxng/src/org/intellij/plugins/relaxNG/model/resolve/RelaxSymbolIndex.java
xml/relaxng/src/org/intellij/plugins/relaxNG/references/AttributeValueFunction.java
xml/relaxng/src/org/intellij/plugins/relaxNG/references/FileReferenceUtil.java
xml/xml-psi-impl/src/com/intellij/xml/index/XmlNamespaceIndex.java
xml/xml-psi-impl/src/com/intellij/xml/util/XmlUtil.java

index 3d524a09e0f28f0b0c9ed3049e594e84f41ab851..db24aae19e089c473e8745fafed71543743edd05 100644 (file)
@@ -29,7 +29,7 @@ import java.util.function.Consumer;
  */
 public class UnicodeCharacterNames {
 
-  public static void iterate(Consumer<String> consumer) {
+  public static void iterate(Consumer<? super String> consumer) {
     try {
       final Class<?> aClass = Class.forName("java.lang.CharacterName");
       final Method initNamePool = ReflectionUtil.getDeclaredMethod(aClass, "initNamePool");
index 13c1ce63e3804f2a17e1ca924d2f9332299e4214..b05e99c4858a1d1115a18faba81b9dffeb8b685f 100644 (file)
@@ -118,7 +118,7 @@ public class BuildArtifactAction extends DumbAwareAction {
     popup.showCenteredInCurrentWindow(project);
   }
 
-  private static void doBuild(@NotNull Project project, final @NotNull List<ArtifactPopupItem> items, boolean rebuild) {
+  private static void doBuild(@NotNull Project project, final @NotNull List<? extends ArtifactPopupItem> items, boolean rebuild) {
     final Artifact[] artifacts = getArtifacts(items, project);
     if (rebuild) {
       ProjectTaskManager.getInstance(project).rebuild(artifacts);
@@ -128,7 +128,7 @@ public class BuildArtifactAction extends DumbAwareAction {
     }
   }
 
-  private static Artifact[] getArtifacts(final List<ArtifactPopupItem> items, final Project project) {
+  private static Artifact[] getArtifacts(final List<? extends ArtifactPopupItem> items, final Project project) {
     Set<Artifact> artifacts = new LinkedHashSet<>();
     for (ArtifactPopupItem item : items) {
       artifacts.addAll(item.getArtifacts(project));
index ac916faa50faf8a025f8605c64e01b1de9dd1baf..7a4256196013d61eee3348ee5356175597aa6eb8 100644 (file)
@@ -66,12 +66,12 @@ public class PackageFileWorker {
     myPackIntoArchives = packIntoArchives;
   }
 
-  public static void startPackagingFiles(Project project, List<VirtualFile> files, Artifact[] artifacts, final @NotNull Runnable onFinishedInAwt) {
+  public static void startPackagingFiles(Project project, List<? extends VirtualFile> files, Artifact[] artifacts, final @NotNull Runnable onFinishedInAwt) {
     startPackagingFiles(project, files, artifacts, true).doWhenProcessed(
       () -> ApplicationManager.getApplication().invokeLater(onFinishedInAwt));
   }
 
-  public static ActionCallback startPackagingFiles(final Project project, final List<VirtualFile> files,
+  public static ActionCallback startPackagingFiles(final Project project, final List<? extends VirtualFile> files,
                                                    final Artifact[] artifacts, final boolean packIntoArchives) {
     final ActionCallback callback = new ActionCallback();
     ProgressManager.getInstance().run(new Task.Backgroundable(project, "Packaging Files") {
index bdfaf4a289544b24a0e17c42932bbaeb66b6f5af..e7322d044f6b9306a6ed724292acb6ec2ca387b1 100644 (file)
@@ -233,7 +233,7 @@ public abstract class DebuggerUtilsEx extends DebuggerUtils {
     return isFiltered(qName, Arrays.asList(classFilters));
   }
 
-  public static boolean isFiltered(@NotNull String qName, List<ClassFilter> classFilters) {
+  public static boolean isFiltered(@NotNull String qName, List<? extends ClassFilter> classFilters) {
     if (qName.indexOf('[') != -1) {
       return false; //is array
     }
@@ -245,7 +245,7 @@ public abstract class DebuggerUtilsEx extends DebuggerUtils {
     return (int)Arrays.stream(classFilters).filter(ClassFilter::isEnabled).count();
   }
 
-  public static ClassFilter[] readFilters(List<Element> children) {
+  public static ClassFilter[] readFilters(List<? extends Element> children) {
     if (ContainerUtil.isEmpty(children)) {
       return ClassFilter.EMPTY_ARRAY;
     }
@@ -281,13 +281,13 @@ public abstract class DebuggerUtilsEx extends DebuggerUtils {
     return f2.equals(f1);
   }
 
-  private static boolean elementListsEqual(List<Element> l1, List<Element> l2) {
+  private static boolean elementListsEqual(List<? extends Element> l1, List<? extends Element> l2) {
     if (l1 == null) return l2 == null;
     if (l2 == null) return false;
 
     if (l1.size() != l2.size()) return false;
 
-    Iterator<Element> i1 = l1.iterator();
+    Iterator<? extends Element> i1 = l1.iterator();
 
     for (Element aL2 : l2) {
       Element elem1 = i1.next();
@@ -297,13 +297,13 @@ public abstract class DebuggerUtilsEx extends DebuggerUtils {
     return true;
   }
 
-  private static boolean attributeListsEqual(List<Attribute> l1, List<Attribute> l2) {
+  private static boolean attributeListsEqual(List<? extends Attribute> l1, List<? extends Attribute> l2) {
     if (l1 == null) return l2 == null;
     if (l2 == null) return false;
 
     if (l1.size() != l2.size()) return false;
 
-    Iterator<Attribute> i1 = l1.iterator();
+    Iterator<? extends Attribute> i1 = l1.iterator();
 
     for (Attribute aL2 : l2) {
       Attribute attr1 = i1.next();
@@ -630,7 +630,7 @@ public abstract class DebuggerUtilsEx extends DebuggerUtils {
     }
   }
 
-  public static String getSourceName(Location location, Function<Throwable, String> defaultName) {
+  public static String getSourceName(Location location, Function<? super Throwable, String> defaultName) {
     try {
       return location.sourceName();
     }
index 8e64d1b383ac024a39e0c7d8649b3e3582dfade8..3d4699da30062d5d6fa54e1ef88b69af029a17de 100644 (file)
@@ -219,11 +219,11 @@ public class DebuggerUtilsImpl extends DebuggerUtilsEx{
     return Boolean.TRUE.equals(debugProcess.getUserData(BatchEvaluator.REMOTE_SESSION_KEY));
   }
 
-  public static <T, E extends Exception> T suppressExceptions(ThrowableComputable<T, E> supplier, T defaultValue) throws E {
+  public static <T, E extends Exception> T suppressExceptions(ThrowableComputable<? extends T, ? extends E> supplier, T defaultValue) throws E {
     return suppressExceptions(supplier, defaultValue, true, null);
   }
 
-  public static <T, E extends Exception> T suppressExceptions(ThrowableComputable<T, E> supplier,
+  public static <T, E extends Exception> T suppressExceptions(ThrowableComputable<? extends T, ? extends E> supplier,
                                                               T defaultValue,
                                                               boolean ignorePCE,
                                                               Class<E> rethrow) throws E {
index 369ce9a94288e170c3334a2f6394dddf6b1459d6..e58edb9978fa8406dadb5db05fe133266131d2c6 100644 (file)
@@ -108,7 +108,7 @@ public class HotSwapManager {
     }
   }
 
-  public static Map<DebuggerSession, Map<String, HotSwapFile>> findModifiedClasses(List<DebuggerSession> sessions, Map<String, List<String>> generatedPaths) {
+  public static Map<DebuggerSession, Map<String, HotSwapFile>> findModifiedClasses(List<? extends DebuggerSession> sessions, Map<String, List<String>> generatedPaths) {
     final Map<DebuggerSession, Map<String, HotSwapFile>> result = new HashMap<>();
     List<Pair<DebuggerSession, Long>> sessionWithStamps = new ArrayList<>();
     for (DebuggerSession session : sessions) {
@@ -135,7 +135,7 @@ public class HotSwapManager {
   }
 
 
-  public static Map<DebuggerSession, Map<String, HotSwapFile>> scanForModifiedClasses(final List<DebuggerSession> sessions,
+  public static Map<DebuggerSession, Map<String, HotSwapFile>> scanForModifiedClasses(final List<? extends DebuggerSession> sessions,
                                                                                       final HotSwapProgress swapProgress) {
     final Map<DebuggerSession, Map<String, HotSwapFile>> modifiedClasses = new HashMap<>();
 
index 66f353b1383c05921b49d8fd9e0735aa73819458..0412125f8dea3556f814b0c000c6c0961df38299 100644 (file)
@@ -13,7 +13,7 @@ import java.util.stream.Collectors;
 public class JavaTypeInfo implements TypeInfo {
   private final ReferenceType referenceType;
 
-  public static List<TypeInfo> wrap(List<ReferenceType> types) {
+  public static List<TypeInfo> wrap(List<? extends ReferenceType> types) {
     return types.stream().map(JavaTypeInfo::new).collect(Collectors.toList());
   }
 
index c6b3acfd1aa05e928b2860c305d65d41c6dd010d..c4e93ae4c6bd96ed8cf85697f2a7e63c1ce5cb10 100644 (file)
@@ -421,7 +421,7 @@ public abstract class Breakpoint<P extends JavaBreakpointProperties> implements
                                           EventRequest request,
                                           PsiElement context,
                                           TextWithImports text,
-                                          EvaluatingComputable<ExpressionEvaluator> supplier) throws EvaluateException {
+                                          EvaluatingComputable<? extends ExpressionEvaluator> supplier) throws EvaluateException {
       EvaluatorCache cache = (EvaluatorCache)request.getProperty(propertyName);
       if (cache != null && Objects.equals(cache.myContext, context) && Objects.equals(cache.myTextWithImports, text)) {
         return cache.myEvaluator;
index 7d33b3f00493321c956784148e1db6419d5c6a33..16c0d4cd964d2cac445c5d3570449745938a6c86 100644 (file)
@@ -70,7 +70,7 @@ public abstract class JavaLineBreakpointTypeBase<P extends JavaBreakpointPropert
   protected static boolean canPutAtElement(@NotNull final VirtualFile file,
                                            final int line,
                                            @NotNull Project project,
-                                           @NotNull PairFunction<PsiElement, Document, Boolean> processor) {
+                                           @NotNull PairFunction<? super PsiElement, ? super Document, Boolean> processor) {
     PsiFile psiFile = PsiManager.getInstance(project).findFile(file);
     // JSPX supports jvm debugging, but not in XHTML files
     if (psiFile == null || psiFile.getViewProvider().getFileType() == StdFileTypes.XHTML) {
index af081af22406f8b0aaac9624013eed39e9806689..5a6ea383e3ecb986e398351329395f84f1e4e034 100644 (file)
@@ -141,7 +141,7 @@ public class CompilingEvaluatorImpl extends CompilingEvaluator {
   @Nullable
   public static ExpressionEvaluator create(@NotNull Project project,
                                            @Nullable PsiElement psiContext,
-                                           @NotNull Function<PsiElement, PsiCodeFragment> fragmentFactory)
+                                           @NotNull Function<? super PsiElement, ? extends PsiCodeFragment> fragmentFactory)
     throws EvaluateException {
     if (Registry.is("debugger.compiling.evaluator") && psiContext != null) {
       return ApplicationManager.getApplication().runReadAction((ThrowableComputable<ExpressionEvaluator, EvaluateException>)() -> {
index 691a9a691609b6d904f53b3e149c3778debf35a0..6d9c4be6a7aa7d54a99a560a2eb467df12514ebb 100644 (file)
@@ -49,7 +49,7 @@ public class TestClassCollector {
   public static String[] collectClassFQNames(String packageName,
                                              @Nullable Path rootPath,
                                              JavaTestConfigurationBase configuration,
-                                             Function<ClassLoader, Predicate<Class<?>>> predicateProducer) {
+                                             Function<? super ClassLoader, ? extends Predicate<Class<?>>> predicateProducer) {
     Module module = configuration.getConfigurationModule().getModule();
     ClassLoader classLoader = createUsersClassLoader(configuration);
     Set<String> classes = new HashSet<>();
index 3820f073466127f37e5c4a772b6a1bff7fb9c455..67cd9268cf42fdad69f1b1037bd71c74595e7587 100644 (file)
@@ -60,7 +60,7 @@ public class IntellijTestDiscoveryProducer implements TestDiscoveryProducer {
   }
 
   @NotNull
-  private static <T> MultiMap<String, String> request(List<T> collection, Function<T, String> toString, String what) throws IOException {
+  private static <T> MultiMap<String, String> request(List<T> collection, Function<? super T, String> toString, String what) throws IOException {
     if (collection.isEmpty()) return MultiMap.empty();
     String url = INTELLIJ_TEST_DISCOVERY_HOST + "/search/tests/by-" + what;
     LOG.debug(url);
index c0f5d5b8a2324cf7ea60ae6b38c80979135b3bc5..25e4935f27368d0d15d22996b94d5f96f3500bd8 100644 (file)
@@ -128,7 +128,7 @@ public abstract class TestDiscoveryConfigurationProducer extends JavaRunConfigur
     return new MyRunProfile(testMethods, module, configuration, configurationName);
   }
 
-  public static Module detectTargetModule(Collection<Module> survivedModules, Project project) {
+  public static Module detectTargetModule(Collection<? extends Module> survivedModules, Project project) {
     ModuleManager moduleManager = ModuleManager.getInstance(project);
     final Set<Module> allModules = new HashSet<>(Arrays.asList(moduleManager.getModules()));
     survivedModules
index ceb45c969496bd302fefa7ba4355910bda8dcd60..d500d5f426f908bfa4c2122aeeebe2da182a1b76 100644 (file)
@@ -80,7 +80,7 @@ public class TestDiscoverySearchHelper {
   }
 
   private static void collectPatterns(@NotNull Project project,
-                                      @NotNull Set<String> patterns,
+                                      @NotNull Set<? super String> patterns,
                                       @NotNull String classFQName,
                                       @NotNull String methodName,
                                       byte frameworkId) {
index fa10c7070460e7fc22562489c655bf12736617f4..2340da0264be4bcffd48546b6a245063fa10fa1c 100644 (file)
@@ -434,7 +434,7 @@ public class ShowAffectedTestsAction extends AnAction {
 
   private static void runAllDiscoveredTests(@NotNull Project project,
                                             @NotNull DiscoveredTestsTree tree,
-                                            @NotNull Ref<JBPopup> ref,
+                                            @NotNull Ref<? extends JBPopup> ref,
                                             @NotNull ConfigurationContext context,
                                             @NotNull String title) {
     Executor executor = DefaultRunExecutor.getRunExecutorInstance();
@@ -508,7 +508,7 @@ public class ShowAffectedTestsAction extends AnAction {
   }
 
   @NotNull
-  public static List<String> getRelativeAffectedPaths(@NotNull Project project, @NotNull Collection<Change> changes) {
+  public static List<String> getRelativeAffectedPaths(@NotNull Project project, @NotNull Collection<? extends Change> changes) {
     VirtualFile baseDir = getBasePathAsVirtualFile(project);
     return baseDir == null ?
            Collections.emptyList() :
index 8ef9a6d493c4ad06e75f4516b44ecabdd647dde1..7828f7bf9fc4de1b0131553eb6d67496e03af19e 100644 (file)
@@ -97,7 +97,7 @@ public class FrameworkSupportUtil {
   }
 
   @Nullable
-  public static FrameworkSupportInModuleProvider findProvider(@NotNull String id, final List<FrameworkSupportInModuleProvider> providers) {
+  public static FrameworkSupportInModuleProvider findProvider(@NotNull String id, final List<? extends FrameworkSupportInModuleProvider> providers) {
     for (FrameworkSupportInModuleProvider provider : providers) {
       String frameworkId = provider.getFrameworkType().getId();
       if (id.equals(frameworkId)
index 797560d6b0a0e365cdeeca85c58a2bcef0abd4dc..095f3c91a685b0d2ad9223f52fb29332ea66f3cd 100644 (file)
@@ -355,7 +355,7 @@ public abstract class ModuleInsight {
   }
 
   public static Collection<LibraryDescriptor> getLibraryDependencies(ModuleDescriptor module,
-                                                                     @Nullable List<LibraryDescriptor> allLibraries) {
+                                                                     @Nullable List<? extends LibraryDescriptor> allLibraries) {
     final Set<LibraryDescriptor> libs = new HashSet<>();
     if (allLibraries != null) {
       for (LibraryDescriptor library : allLibraries) {
@@ -388,7 +388,7 @@ public abstract class ModuleInsight {
   }
 
 
-  private static List<LibraryDescriptor> buildInitialLibrariesLayout(final Set<File> jars) {
+  private static List<LibraryDescriptor> buildInitialLibrariesLayout(final Set<? extends File> jars) {
     final Map<File, LibraryDescriptor> rootToLibraryMap = new HashMap<>();
     for (File jar : jars) {
       final File parent = jar.getParentFile();
index 9035efd0320068e4b95650ec382c45cafed3264e..2bf6224816bd88c5f355134ab16dfd1a06943b59 100644 (file)
@@ -73,7 +73,7 @@ public class RootDetectionProcessor {
     }
   }
 
-  public static MultiMap<ProjectStructureDetector, DetectedProjectRoot> createRootsMap(List<DetectedRootData> list) {
+  public static MultiMap<ProjectStructureDetector, DetectedProjectRoot> createRootsMap(List<? extends DetectedRootData> list) {
     MultiMap<ProjectStructureDetector, DetectedProjectRoot> roots = new MultiMap<>();
     for (final DetectedRootData rootData : list) {
       for (ProjectStructureDetector detector : rootData.getSelectedDetectors()) {
index e35610165e20b336d5bac2dee8a11bc572a77485..d8d714d2d8511c9151495b3c661165bc566474c2 100644 (file)
@@ -62,7 +62,7 @@ public abstract class AbstractAttachSourceProvider implements AttachSourcesProvi
   }
 
   @Nullable
-  protected static Library getLibraryFromOrderEntriesList(List<LibraryOrderEntry> orderEntries) {
+  protected static Library getLibraryFromOrderEntriesList(List<? extends LibraryOrderEntry> orderEntries) {
     if (orderEntries.isEmpty()) return null;
 
     Library library = orderEntries.get(0).getLibrary();
index 66c5cfce0c28975cbd206538646b46c7f6fbca72..bf88b1c25d2edc860326b9b31345da8868011c52 100644 (file)
@@ -337,7 +337,7 @@ public class JdkComboBox extends ComboBoxWithWidePopup<JdkComboBox.JdkComboBoxIt
     }
   }
 
-  public static Condition<Sdk> getSdkFilter(@Nullable final Condition<SdkTypeId> filter) {
+  public static Condition<Sdk> getSdkFilter(@Nullable final Condition<? super SdkTypeId> filter) {
     return filter == null ? Conditions.alwaysTrue() : sdk -> filter.value(sdk.getSdkType());
   }
 
index af6457422eb94fb2397c4920ef2c01ac4cd3af9c..abc5dc8d70940d426aa7d9ca5e85276f95ffb773 100644 (file)
@@ -45,7 +45,7 @@ public class AddCompositeElementAction extends DumbAwareAction {
     myArtifactEditor.addNewPackagingElement(myElementType);
   }
 
-  public static void addCompositeCreateActions(List<AnAction> actions, final ArtifactEditorEx artifactEditor) {
+  public static void addCompositeCreateActions(List<? super AnAction> actions, final ArtifactEditorEx artifactEditor) {
     for (CompositePackagingElementType packagingElementType : PackagingElementFactory.getInstance().getCompositeElementTypes()) {
       actions.add(new AddCompositeElementAction(artifactEditor, packagingElementType));
     }
index a600f98af2ce191ea57505859bba8e614da33d79..95606be5ba331adceae74bc78c6f10d0ed4bed25 100644 (file)
@@ -39,11 +39,11 @@ public class PackagingTreeNodeFactory {
   }
 
   public static void addNodes(@NotNull List<? extends PackagingElement<?>> elements, @NotNull CompositePackagingElementNode parentNode,
-                               @NotNull CompositePackagingElement parentElement, @NotNull ArtifactEditorContext context,
-                               @NotNull ComplexElementSubstitutionParameters substitutionParameters, @NotNull Collection<PackagingNodeSource> nodeSources,
-                               @NotNull List<PackagingElementNode<?>> nodes,
-                               ArtifactType artifactType,
-                               Set<PackagingElement<?>> processed) {
+                              @NotNull CompositePackagingElement parentElement, @NotNull ArtifactEditorContext context,
+                              @NotNull ComplexElementSubstitutionParameters substitutionParameters, @NotNull Collection<PackagingNodeSource> nodeSources,
+                              @NotNull List<PackagingElementNode<?>> nodes,
+                              ArtifactType artifactType,
+                              Set<? super PackagingElement<?>> processed) {
     for (PackagingElement<?> element : elements) {
       final PackagingElementNode<?> prev = findEqual(nodes, element);
       if (prev != null) {
@@ -78,7 +78,7 @@ public class PackagingTreeNodeFactory {
   }
 
   @Nullable
-  private static PackagingElementNode<?> findEqual(List<PackagingElementNode<?>> children, PackagingElement<?> element) {
+  private static PackagingElementNode<?> findEqual(List<? extends PackagingElementNode<?>> children, PackagingElement<?> element) {
     for (PackagingElementNode<?> node : children) {
       if (node.getFirstElement().isEqualTo(element)) {
         return node;
index b494316eb539f3a1def4b502ac10cd933d713c7d..e1cc00f606dc3c7ee735474f9355b17191aa2b3b 100644 (file)
@@ -91,7 +91,7 @@ public class ModuleSourceItemGroup extends PackagingSourceItem {
     return result;
   }
 
-  private static void collectDependentModules(final Module module, Set<Module> modules, ArtifactEditorContext context) {
+  private static void collectDependentModules(final Module module, Set<? super Module> modules, ArtifactEditorContext context) {
     if (!modules.add(module)) return;
     
     for (OrderEntry entry : context.getModulesProvider().getRootModel(module).getOrderEntries()) {
index e6343df84cd38222352643ead4d5b3c4c9e69b35..849360aed7339a14f7e501d0e051bf729d2c89b7 100644 (file)
@@ -67,14 +67,14 @@ public class AddCustomLibraryDialog extends DialogWrapper {
 
   public static AddCustomLibraryDialog createDialog(@NotNull CustomLibraryDescription description,
                                                     final @NotNull Module module,
-                                                    final ParameterizedRunnable<ModifiableRootModel> beforeLibraryAdded) {
+                                                    final ParameterizedRunnable<? super ModifiableRootModel> beforeLibraryAdded) {
     return createDialog(description, LibrariesContainerFactory.createContainer(module), module, null, beforeLibraryAdded);
   }
 
   public static AddCustomLibraryDialog createDialog(CustomLibraryDescription description,
                                                     final @NotNull LibrariesContainer librariesContainer, final @NotNull Module module,
                                                     final @Nullable ModifiableRootModel modifiableRootModel,
-                                                    @Nullable ParameterizedRunnable<ModifiableRootModel> beforeLibraryAdded) {
+                                                    @Nullable ParameterizedRunnable<? super ModifiableRootModel> beforeLibraryAdded) {
     return new AddCustomLibraryDialog(description, librariesContainer, module, modifiableRootModel, beforeLibraryAdded);
   }
 
index 75f2aa22d40809f3fb78f2ced033c03b101e1ff9..6d055a5b3066f3aa274ab1b3dd62065dc794c62e 100644 (file)
@@ -186,7 +186,7 @@ public class UnusedSymbolUtil {
                                       @NotNull PsiMember member,
                                       @NotNull ProgressIndicator progress,
                                       @Nullable PsiFile ignoreFile,
-                                      @NotNull Processor<UsageInfo> usageInfoProcessor) {
+                                      @NotNull Processor<? super UsageInfo> usageInfoProcessor) {
     String name = member.getName();
     if (name == null) {
       log("* "+member.getName()+" no name; false");
index c061b8e6f162c1658af17705b1131fd476d56df9..ff8f84db61b8e36d21c362e7370b66d4a6ad78b0 100644 (file)
@@ -232,7 +232,7 @@ class RefCountHolder {
     return usedStatus == Boolean.TRUE;
   }
 
-  private static boolean isParameterUsedRecursively(@NotNull PsiElement element, @NotNull Collection<PsiReference> array) {
+  private static boolean isParameterUsedRecursively(@NotNull PsiElement element, @NotNull Collection<? extends PsiReference> array) {
     if (!(element instanceof PsiParameter)) return false;
     PsiParameter parameter = (PsiParameter)element;
     PsiElement scope = parameter.getDeclarationScope();
index d9ce8c5a073524365040bc5ed275d1647b249d9d..4740565dd7439726c14539eaae505f3ecdaa3c61 100644 (file)
@@ -126,7 +126,7 @@ public class ChangeStringLiteralToCharInMethodCallFix implements IntentionAction
     }
   }
 
-  private static void processLiterals(@NotNull final Set<PsiLiteralExpression> literals,
+  private static void processLiterals(@NotNull final Set<? extends PsiLiteralExpression> literals,
                                       @NotNull final PsiCall call,
                                       @NotNull final HighlightInfo info) {
     for (PsiLiteralExpression literal : literals) {
index 8c01011d35c0f0de0d114ad9b33e51f182ac203b..b7b6b84d7d56d7355f9362b2f93f1a142d0d21af 100644 (file)
@@ -24,14 +24,14 @@ import static org.jetbrains.org.objectweb.asm.Opcodes.*;
 
 abstract class PResults {
   // SoP = sum of products
-  static Set<Set<EKey>> join(Set<Set<EKey>> sop1, Set<Set<EKey>> sop2) {
+  static Set<Set<EKey>> join(Set<? extends Set<EKey>> sop1, Set<? extends Set<EKey>> sop2) {
     Set<Set<EKey>> sop = new HashSet<>();
     sop.addAll(sop1);
     sop.addAll(sop2);
     return sop;
   }
 
-  static Set<Set<EKey>> meet(Set<Set<EKey>> sop1, Set<Set<EKey>> sop2) {
+  static Set<Set<EKey>> meet(Set<? extends Set<EKey>> sop1, Set<? extends Set<EKey>> sop2) {
     Set<Set<EKey>> sop = new HashSet<>();
     for (Set<EKey> prod1 : sop1) {
       for (Set<EKey> prod2 : sop2) {
@@ -82,7 +82,7 @@ abstract class PResults {
       sop.add(prod);
     }
 
-    static void checkLimit(Set<Set<EKey>> sop) throws AnalyzerException {
+    static void checkLimit(Set<? extends Set<EKey>> sop) throws AnalyzerException {
       int size = sop.stream().mapToInt(Set::size).sum();
       if (size > Analysis.EQUATION_SIZE_LIMIT) {
         throw new AnalyzerException(null, "HEquation size is too big");
index 20899a51419ee9d66b8e6e18432e5c07da0b21f7..f153ea640a2c85d93737975bf607ae24782d1c88 100644 (file)
@@ -10,7 +10,7 @@ import java.util.function.Predicate;
 import static com.intellij.util.ObjectUtils.tryCast;
 
 class InlinerUtil {
-  static boolean isLambdaChainParameterReference(PsiExpression expression, Predicate<PsiType> chainTypePredicate) {
+  static boolean isLambdaChainParameterReference(PsiExpression expression, Predicate<? super PsiType> chainTypePredicate) {
     if(!(expression instanceof PsiReferenceExpression)) return false;
     PsiParameter target = tryCast(((PsiReferenceExpression)expression).resolve(), PsiParameter.class);
     if (target == null) return false;
index aeee6f796018f308d43624e241d5915587a40cb3..382aedd625069aa2dd5ebc21be4a6c6c384a9fe2 100644 (file)
@@ -232,7 +232,7 @@ public class RefClassImpl extends RefJavaElementImpl implements RefClass {
     return myRefModule;
   }
 
-  private static boolean isSelfInheritor(UClass uClass, List<UClass> visited) {
+  private static boolean isSelfInheritor(UClass uClass, List<? super UClass> visited) {
     if (visited.contains(uClass)) return true;
     visited.add(uClass);
     if (uClass.getUastSuperTypes().stream()
index b5d22aa12af83d05b140482ab1704ce66407f990..b2df8dc8f5647d36fea372eeaa290f182ee9e17d 100644 (file)
@@ -80,7 +80,7 @@ public class SpecialAnnotationsUtilBase {
     */
   }
 
-  public static void createAddToSpecialAnnotationFixes(@NotNull PsiModifierListOwner owner, @NotNull Processor<String> processor) {
+  public static void createAddToSpecialAnnotationFixes(@NotNull PsiModifierListOwner owner, @NotNull Processor<? super String> processor) {
     final PsiModifierList modifierList = owner.getModifierList();
     if (modifierList != null) {
       final PsiAnnotation[] psiAnnotations = modifierList.getAnnotations();
index 6c31b2d458ea4128ee19ee030d2f9f95a7e3c254..347e04e06fa47c01d3d6c929abc598e6a3671745 100644 (file)
@@ -94,7 +94,7 @@ public class JavaFindUsagesHelper {
 
   public static boolean processElementUsages(@NotNull final PsiElement element,
                                              @NotNull final FindUsagesOptions options,
-                                             @NotNull final Processor<UsageInfo> processor) {
+                                             @NotNull final Processor<? super UsageInfo> processor) {
     if (options instanceof JavaVariableFindUsagesOptions) {
       final JavaVariableFindUsagesOptions varOptions = (JavaVariableFindUsagesOptions) options;
       if (varOptions.isReadAccess || varOptions.isWriteAccess){
index 744b09219d3084aaca1d5453a69fac68075e3efd..6b3c3829e221e8a1406a0fe3d982126fe7c50089 100644 (file)
@@ -306,7 +306,7 @@ public class CodeInsightUtil {
                                      final PsiElement context,
                                      boolean getRawSubtypes,
                                      @NotNull final PrefixMatcher matcher,
-                                     Consumer<PsiType> consumer) {
+                                     Consumer<? super PsiType> consumer) {
     int arrayDim = psiType.getArrayDimensions();
 
     psiType = psiType.getDeepComponentType();
@@ -383,7 +383,7 @@ public class CodeInsightUtil {
                                                               PsiClassType baseType,
                                                               int arrayDim,
                                                               boolean getRawSubtypes,
-                                                              Consumer<PsiType> result,
+                                                              Consumer<? super PsiType> result,
                                                               @NotNull PsiClass baseClass,
                                                               PsiSubstitutor baseSubstitutor) {
     PsiManager manager = context.getManager();
index 8a4ee30bd9ee5ccb2fddf771c4cce0483d257ccd..dfbd37f7650d1fe03de919217d569e57370fbf2e 100644 (file)
@@ -114,7 +114,7 @@ public class AllClassesGetter {
   public static void processJavaClasses(@NotNull final CompletionParameters parameters,
                                         @NotNull final PrefixMatcher prefixMatcher,
                                         final boolean filterByScope,
-                                        @NotNull final Consumer<PsiClass> consumer) {
+                                        @NotNull final Consumer<? super PsiClass> consumer) {
     final PsiElement context = parameters.getPosition();
     final Project project = context.getProject();
     final GlobalSearchScope scope = filterByScope ? context.getContainingFile().getResolveScope() : GlobalSearchScope.allScope(project);
@@ -125,7 +125,7 @@ public class AllClassesGetter {
   public static void processJavaClasses(@NotNull final PrefixMatcher prefixMatcher,
                                         @NotNull Project project,
                                         @NotNull GlobalSearchScope scope,
-                                        @NotNull Processor<PsiClass> processor) {
+                                        @NotNull Processor<? super PsiClass> processor) {
     final Set<String> names = new THashSet<>(10000);
     AllClassesSearchExecutor.processClassNames(project, scope, s -> {
       if (prefixMatcher.prefixMatches(s)) {
index 2ad1647630ceed76c2995f7a3dda5cab294de459..e7b0ba5da9a4904dc1ecd248a8f64cac8c248a95 100644 (file)
@@ -35,7 +35,7 @@ public class BasicExpressionCompletionContributor {
   }
 
   public static void fillCompletionVariants(JavaSmartCompletionParameters parameters,
-                                            final Consumer<LookupElement> result,
+                                            final Consumer<? super LookupElement> result,
                                             PrefixMatcher matcher) {
     final PsiElement element = parameters.getPosition();
     if (JavaKeywordCompletion.isAfterTypeDot(element)) {
index d5e232e778011b035e7784685e76562f8c6bcca8..f4e9630b3a00e1f3beaf18f60dc6f4aaa96cf4d5 100644 (file)
@@ -97,7 +97,7 @@ public class JavaClassNameCompletionContributor extends CompletionContributor {
   public static void addAllClasses(@NotNull CompletionParameters parameters,
                                    final boolean filterByScope,
                                    @NotNull final PrefixMatcher matcher,
-                                   @NotNull final Consumer<LookupElement> consumer) {
+                                   @NotNull final Consumer<? super LookupElement> consumer) {
     final PsiElement insertedElement = parameters.getPosition();
 
     if (JavaCompletionContributor.ANNOTATION_NAME.accepts(insertedElement)) {
index 825d93a89471894621f085a6de1c26b52cbc3c7f..e239e1918ecc5eebc69f949bc834af2b84f8f90f 100644 (file)
@@ -227,7 +227,7 @@ public class JavaInheritorsGetter extends CompletionProvider<CompletionParameter
 
   public static void processInheritors(final CompletionParameters parameters,
                                        Collection<? extends PsiClassType> expectedClassTypes,
-                                       final PrefixMatcher matcher, final Consumer<PsiType> consumer) {
+                                       final PrefixMatcher matcher, final Consumer<? super PsiType> consumer) {
     final PsiElement context = parameters.getPosition();
     GlobalSearchScope scope = context.getResolveScope();
     expectedClassTypes = ContainerUtil.mapNotNull(expectedClassTypes, type -> 
@@ -245,7 +245,7 @@ public class JavaInheritorsGetter extends CompletionProvider<CompletionParameter
   private static boolean processMostProbableInheritors(PsiFile contextFile,
                                                        PsiElement context,
                                                        Collection<? extends PsiClassType> expectedClassTypes,
-                                                       Consumer<PsiType> consumer) {
+                                                       Consumer<? super PsiType> consumer) {
     for (final PsiClassType type : expectedClassTypes) {
       consumer.consume(type);
 
index 09fa15b34f2718da8f6bc7d7a10b0c44e27c26cb..63edfa944d02867ac788bf99122184d83e834dc0 100644 (file)
@@ -215,12 +215,12 @@ public class JavaSmartCompletionContributor extends CompletionContributor {
   }
 
   @NotNull
-  private static Consumer<LookupElement> decorateWithoutTypeCheck(final CompletionResultSet result, final Collection<ExpectedTypeInfo> infos) {
+  private static Consumer<LookupElement> decorateWithoutTypeCheck(final CompletionResultSet result, final Collection<? extends ExpectedTypeInfo> infos) {
     return lookupElement -> result.addElement(decorate(lookupElement, infos));
   }
 
   private static void addExpectedTypeMembers(CompletionParameters params,
-                                             THashSet<ExpectedTypeInfo> mergedInfos,
+                                             THashSet<? extends ExpectedTypeInfo> mergedInfos,
                                              boolean quick,
                                              Consumer<LookupElement> consumer) {
     PsiElement position = params.getPosition();
@@ -243,7 +243,7 @@ public class JavaSmartCompletionContributor extends CompletionContributor {
     super.fillCompletionVariants(parameters, JavaCompletionSorting.addJavaSorting(parameters, result));
   }
 
-  public static SmartCompletionDecorator decorate(LookupElement lookupElement, Collection<ExpectedTypeInfo> infos) {
+  public static SmartCompletionDecorator decorate(LookupElement lookupElement, Collection<? extends ExpectedTypeInfo> infos) {
     return new SmartCompletionDecorator(lookupElement, infos);
   }
 
index 2f6d6b9a37171a637112828897e7cf5e54080407..547dc3651455d016d4bb954bc47b6af87c4910f2 100644 (file)
@@ -896,7 +896,7 @@ public class CreateFromUsageUtils {
     return isInNamedElement || element.getTextRange().contains(offset-1);
   }
 
-  public static void addClassesWithMember(final String memberName, final PsiFile file, final Set<String> possibleClassNames, final boolean method,
+  public static void addClassesWithMember(final String memberName, final PsiFile file, final Set<? super String> possibleClassNames, final boolean method,
                                           final boolean staticAccess) {
     addClassesWithMember(memberName, file, possibleClassNames, method, staticAccess, true);
   }
index 37230f90faa9009c1f12683fe0e4d88e39003225..3ffb57447d14296a13dfd481302499cf9c306bf4 100644 (file)
@@ -209,7 +209,7 @@ public class CreateMethodFromUsageFix extends CreateFromUsageBaseFix {
     return method;
   }
 
-  public static void doCreate(PsiClass targetClass, PsiMethod method, List<Pair<PsiExpression, PsiType>> arguments, PsiSubstitutor substitutor,
+  public static void doCreate(PsiClass targetClass, PsiMethod method, List<? extends Pair<PsiExpression, PsiType>> arguments, PsiSubstitutor substitutor,
                               ExpectedTypeInfo[] expectedTypes, @Nullable PsiElement context) {
     doCreate(targetClass, method, shouldBeAbstractImpl(null, targetClass), arguments, substitutor, expectedTypes, context);
   }
index d952eea786096aa3b08d5bc9519eed2c95d1c679..c307e70993df97980c3826a4054a2791ac8999d4 100644 (file)
@@ -66,8 +66,8 @@ public class JavaOverrideImplementMemberChooser extends MemberChooser<PsiMethodM
   @Nullable
   public static JavaOverrideImplementMemberChooser create(final PsiElement aClass,
                                                           final boolean toImplement,
-                                                          final Collection<CandidateInfo> candidates,
-                                                          final Collection<CandidateInfo> secondary) {
+                                                          final Collection<? extends CandidateInfo> candidates,
+                                                          final Collection<? extends CandidateInfo> secondary) {
     final Project project = aClass.getProject();
     final PsiFile file = aClass.getContainingFile();
     if (candidates.isEmpty() && secondary.isEmpty()) return null;
@@ -190,7 +190,7 @@ public class JavaOverrideImplementMemberChooser extends MemberChooser<PsiMethodM
              : CodeInsightBundle.message("methods.to.override.chooser.title");
   }
 
-  private static PsiMethodMember[] convertToMethodMembers(Collection<CandidateInfo> candidates) {
+  private static PsiMethodMember[] convertToMethodMembers(Collection<? extends CandidateInfo> candidates) {
     return ContainerUtil.map2Array(candidates, PsiMethodMember.class, s -> new PsiMethodMember(s));
   }
 
index d4e8f011bc5e169068d986550cd072b8e4200e07..aca58f5a52eecece4039f33d0151d71d592e1af0 100644 (file)
@@ -261,7 +261,7 @@ public class OverrideImplementUtil extends OverrideImplementExploreUtil {
 
   @NotNull
   public static List<PsiGenerationInfo<PsiMethod>> overrideOrImplementMethods(@NotNull PsiClass aClass,
-                                                                              @NotNull Collection<PsiMethodMember> candidates,
+                                                                              @NotNull Collection<? extends PsiMethodMember> candidates,
                                                                               boolean toCopyJavaDoc,
                                                                               boolean toInsertAtOverride)
     throws IncorrectOperationException {
@@ -284,7 +284,7 @@ public class OverrideImplementUtil extends OverrideImplementExploreUtil {
   }
 
   @NotNull
-  public static List<PsiGenerationInfo<PsiMethod>> convert2GenerationInfos(@NotNull Collection<PsiMethod> methods) {
+  public static List<PsiGenerationInfo<PsiMethod>> convert2GenerationInfos(@NotNull Collection<? extends PsiMethod> methods) {
     return ContainerUtil.map2List(methods, s -> createGenerationInfo(s));
   }
 
index 07e685aa80a3ef444fa618aaa6f33c7cafdbd864..9fd608eabcadc55884b404fc6e7d45cbca426e59 100644 (file)
@@ -142,7 +142,7 @@ public class InferNullityAnnotationsAction extends BaseAnalysisAction {
   }
 
   public static boolean addAnnotationsDependency(@NotNull final Project project,
-                                                 @NotNull final Set<Module> modulesWithoutAnnotations,
+                                                 @NotNull final Set<? extends Module> modulesWithoutAnnotations,
                                                  @NotNull String annoFQN, final String title) {
     final Library annotationsLib = LibraryUtil.findLibraryByClass(annoFQN, project);
     if (annotationsLib != null) {
index 85ef57484823f2a391f5b692957c635c7bb87739..1065c7568691ddcbdc9c38b31e8e437871cfee72 100644 (file)
@@ -742,7 +742,7 @@ List<PsiExpression> builderStrInitializers = null;
        * @return list of declaration statements or null if error
        */
       @Nullable("when failed to get declaration of any var")
-      static List<PsiDeclarationStatement> getDeclarations(@NotNull List<PsiLocalVariable> variables) {
+      static List<PsiDeclarationStatement> getDeclarations(@NotNull List<? extends PsiLocalVariable> variables) {
         List<PsiDeclarationStatement> list = new ArrayList<>();
         for (PsiLocalVariable var : variables) {
           PsiDeclarationStatement declarationStatement = PsiTreeUtil.getParentOfType(var, PsiDeclarationStatement.class);
index ef9b1a129becb4c724497891814489510d4a4efa..194962d02b6feea8a80106dd78f3860136d1c3be 100644 (file)
@@ -242,7 +242,7 @@ public class StreamToLoopInspection extends AbstractBaseJavaLocalInspectionTool
 
   @Contract("null -> null")
   @Nullable
-  static TerminalOperation getTerminal(List<OperationRecord> operations) {
+  static TerminalOperation getTerminal(List<? extends OperationRecord> operations) {
     if (operations == null || operations.isEmpty()) return null;
     OperationRecord record = operations.get(operations.size()-1);
     if(record.myOperation instanceof TerminalOperation) {
index e17fb13cb2daf9fd665ec0da2676b53918774fb7..e2fc0152319e6abd61a4c0d6280cf2b6fa647ca0 100644 (file)
@@ -293,7 +293,7 @@ public class PackageUtil {
     return false;
   }
 
-  private static PsiDirectory getWritableModuleDirectory(@NotNull Query<VirtualFile> vFiles, @NotNull Module module, PsiManager manager) {
+  private static PsiDirectory getWritableModuleDirectory(@NotNull Query<? extends VirtualFile> vFiles, @NotNull Module module, PsiManager manager) {
     for (VirtualFile vFile : vFiles) {
       if (ModuleUtil.findModuleForFile(vFile, module.getProject()) != module) continue;
       PsiDirectory directory = manager.findDirectory(vFile);
index 141785b51943944c8e53f278b5b74bc4b0235689..fb30e4b3618a6257d27386e766836268fb2e61d3 100644 (file)
@@ -146,7 +146,7 @@ public class SuperMethodWarningUtil {
 
   public static void checkSuperMethod(@NotNull PsiMethod method,
                                       @NotNull String actionString,
-                                      @NotNull final PsiElementProcessor<PsiMethod> processor,
+                                      @NotNull final PsiElementProcessor<? super PsiMethod> processor,
                                       @NotNull Editor editor) {
     ApplicationManager.getApplication().assertIsDispatchThread();
     PsiClass aClass = method.getContainingClass();
index 62a49de9e3fbf405e8414002f415699ba32ac6d1..d9f4ca5397a0e923a243699a084b1ae4d2449239 100644 (file)
@@ -32,7 +32,7 @@ import org.jetbrains.annotations.Nullable;
 public class ClassLiteralGetter {
 
   public static void addCompletions(@NotNull final JavaSmartCompletionParameters parameters,
-                                    @NotNull Consumer<LookupElement> result, final PrefixMatcher matcher) {
+                                    @NotNull Consumer<? super LookupElement> result, final PrefixMatcher matcher) {
     PsiType expectedType = parameters.getDefaultType();
     if (!InheritanceUtil.isInheritor(expectedType, CommonClassNames.JAVA_LANG_CLASS)) {
       expectedType = parameters.getExpectedType();
index b664ea8d65570df0ceaf7cd443ff4da52015ff52..debbc14c39bd322ea1fc9b2de44b5218f1c356b6 100644 (file)
@@ -43,7 +43,7 @@ public class ChangeSignatureUtil {
 
   public static <Parent extends PsiElement, Child extends PsiElement> void synchronizeList(
     Parent list,
-    List<Child> newElements,
+    List<? extends Child> newElements,
     ChildrenGenerator<Parent, Child> generator,
     boolean[] shouldRemoveChild) throws IncorrectOperationException
   {
index fe2d64da1062c0c9d32fab5b2d5845df54686da3..d1500b24b9de2cbee6f4de951f3f69da05e7ad89 100644 (file)
@@ -1565,7 +1565,7 @@ public class InlineMethodProcessor extends BaseRefactoringProcessor {
 
   private static boolean checkUnableToInsertCodeBlock(final PsiCodeBlock methodBody,
                                                       final PsiElement element,
-                                                      final Predicate<PsiMethodCallExpression> errorCondition) {
+                                                      final Predicate<? super PsiMethodCallExpression> errorCondition) {
     PsiStatement[] statements = methodBody.getStatements();
     if (statements.length > 1 || statements.length == 1 && !(statements[0] instanceof PsiExpressionStatement)) {
       PsiMethodCallExpression expr = PsiTreeUtil.getParentOfType(element, PsiMethodCallExpression.class, true, PsiStatement.class);
index 06bdc18909d2c1894ef82503203fb57270e96c88..58485bff2d372789385046a0d0c8fc4980556fe6 100644 (file)
@@ -208,8 +208,8 @@ public class InlineSuperClassRefactoringProcessor extends FixableUsagesRefactori
 
   private static void processChainedCallsInSuper(PsiMethod superConstructorWithChain,
                                                  PsiClass targetClass,
-                                                 List<FixableUsageInfo> usages,
-                                                 Set<PsiMethod> addedSuperConstructors) {
+                                                 List<? super FixableUsageInfo> usages,
+                                                 Set<? super PsiMethod> addedSuperConstructors) {
     addedSuperConstructors.add(superConstructorWithChain);
     PsiMethod chainedConstructor = InlineUtil.getChainedConstructor(superConstructorWithChain);
     while (chainedConstructor != null && addedSuperConstructors.add(chainedConstructor)) {
index 1bf31e0f3a9167aaf1d50d5f54320e10b32314ad..878f032c653407cd97ee0be59362b1d7e1286b1a 100644 (file)
@@ -83,7 +83,7 @@ public class ElementToWorkOn {
     return myExpression == null;
   }
 
-  public static void processElementToWorkOn(final Editor editor, final PsiFile file, final String refactoringName, final String helpId, final Project project, final ElementsProcessor<ElementToWorkOn> processor) {
+  public static void processElementToWorkOn(final Editor editor, final PsiFile file, final String refactoringName, final String helpId, final Project project, final ElementsProcessor<? super ElementToWorkOn> processor) {
     PsiLocalVariable localVar = null;
     PsiExpression expr = null;
 
index c0a14f157071ee74badfcb53349e927010655446..f174065abbe947d67e2a6b0a5e2c809a147b97b4 100644 (file)
@@ -38,9 +38,9 @@ import java.util.List;
 public class Util {
 
   public static void analyzeExpression(PsiExpression expr,
-                                       List<UsageInfo> localVars,
-                                       List<UsageInfo> classMemberRefs,
-                                       List<UsageInfo> params) {
+                                       List<? super UsageInfo> localVars,
+                                       List<? super UsageInfo> classMemberRefs,
+                                       List<? super UsageInfo> params) {
 
     if (expr instanceof PsiThisExpression || expr instanceof PsiSuperExpression) {
       classMemberRefs.add(new ClassMemberInExprUsageInfo(expr));
@@ -89,7 +89,7 @@ public class Util {
     return PsiTreeUtil.isAncestor(getPhysical(ancestor), getPhysical(element), strict);
   }
 
-  public static boolean anyFieldsWithGettersPresent(List<UsageInfo> classMemberRefs) {
+  public static boolean anyFieldsWithGettersPresent(List<? extends UsageInfo> classMemberRefs) {
     for (UsageInfo usageInfo : classMemberRefs) {
 
       if (usageInfo.getElement() instanceof PsiReferenceExpression) {
index 9ec6f0bf79e666bbaa44734d9c7e57edc4d0ea94..31c1550e4755c1ac3d8543490e1324afdf9b690a 100644 (file)
@@ -185,7 +185,7 @@ public abstract class IntroduceVariableBase extends IntroduceHandlerBase {
     }
   }
 
-  public static boolean isChooserNeeded(List<PsiExpression> exprs) {
+  public static boolean isChooserNeeded(List<? extends PsiExpression> exprs) {
     if (exprs.size() == 1) {
       final PsiExpression expression = exprs.get(0);
       return expression instanceof PsiNewExpression && ((PsiNewExpression)expression).getAnonymousClass() != null;
@@ -204,7 +204,7 @@ public abstract class IntroduceVariableBase extends IntroduceHandlerBase {
            isPreferStatements();
   }
 
-  public static int preferredSelection(PsiElement[] statementsInRange, List<PsiExpression> expressions) {
+  public static int preferredSelection(PsiElement[] statementsInRange, List<? extends PsiExpression> expressions) {
     int selection;
     if (statementsInRange.length == 1 &&
         statementsInRange[0] instanceof PsiExpressionStatement &&
index f85a3231e1a75a4b2954b67c0145c578d211409e..ba0e6e52febe2fd1829c5f2cc89f9ca132b5ef5c 100644 (file)
@@ -40,7 +40,7 @@ public class MakeStaticUtil {
     return findClassRefsInMember(member, false).length > 0;
   }
 
-  private static void addClassRefs(PsiTypeParameterListOwner originalMember, ArrayList<InternalUsageInfo> classRefs,
+  private static void addClassRefs(PsiTypeParameterListOwner originalMember, ArrayList<? super InternalUsageInfo> classRefs,
                                    PsiClass containingClass, PsiElement element, boolean includeSelf) {
     if (element instanceof PsiReferenceExpression) {
       PsiReferenceExpression ref = (PsiReferenceExpression)element;
@@ -123,13 +123,13 @@ public class MakeStaticUtil {
     return false;
   }
 
-  public static boolean buildVariableData(PsiTypeParameterListOwner member, ArrayList<VariableData> result) {
+  public static boolean buildVariableData(PsiTypeParameterListOwner member, ArrayList<? super VariableData> result) {
     final InternalUsageInfo[] classRefsInMethod = findClassRefsInMember(member, false);
     return collectVariableData(member, classRefsInMethod, result);
   }
 
   public static boolean collectVariableData(PsiMember member, InternalUsageInfo[] internalUsages,
-                                             ArrayList<VariableData> variableDatum) {
+                                            ArrayList<? super VariableData> variableDatum) {
     HashSet<PsiField> reported = new HashSet<>();
     HashSet<PsiField> accessedForWriting = new HashSet<>();
     boolean needClassParameter = false;
index 21e7b2570b238253aef68970822266e91933d4b5..57ce57dbe22de9b6cd194eeff70ca7228519e7e8 100644 (file)
@@ -69,7 +69,7 @@ public class MigrationUtil {
     return results.toArray(UsageInfo.EMPTY_ARRAY);
   }
 
-  static void doMigration(PsiElement elementToBind, String newQName, UsageInfo[] usages, ArrayList<SmartPsiElementPointer<PsiElement>> refsToShorten) {
+  static void doMigration(PsiElement elementToBind, String newQName, UsageInfo[] usages, ArrayList<? super SmartPsiElementPointer<PsiElement>> refsToShorten) {
     try {
       SmartPointerManager smartPointerManager = SmartPointerManager.getInstance(elementToBind.getProject());
       // rename all references
index efd0308a0e2304a945ae5d2bee15ede72d4bb581..7d49b65f3acb07b09b52640ad79315c7c98aa4da 100644 (file)
@@ -85,7 +85,7 @@ public class MoveClassesOrPackagesUtil {
                                        boolean searchInNonJavaFiles,
                                        final PsiElement element,
                                        final String newQName,
-                                       ArrayList<UsageInfo> results) {
+                                       ArrayList<? super UsageInfo> results) {
     final String stringToSearch = getStringToSearch(element);
     if (stringToSearch == null) return;
     TextOccurrencesUtil.findNonCodeUsages(element, stringToSearch, searchInStringsAndComments, searchInNonJavaFiles, newQName, results);
@@ -146,7 +146,7 @@ public class MoveClassesOrPackagesUtil {
     moveDirectoryRecursively(dir, destination, new HashSet<>());
   }
 
-  private static void moveDirectoryRecursively(PsiDirectory dir, PsiDirectory destination, HashSet<VirtualFile> movedPaths) throws IncorrectOperationException {
+  private static void moveDirectoryRecursively(PsiDirectory dir, PsiDirectory destination, HashSet<? super VirtualFile> movedPaths) throws IncorrectOperationException {
     final VirtualFile destVFile = destination.getVirtualFile();
     final VirtualFile sourceVFile = dir.getVirtualFile();
     if (movedPaths.contains(sourceVFile)) return;
@@ -316,7 +316,7 @@ public class MoveClassesOrPackagesUtil {
   }
 
   public static VirtualFile chooseSourceRoot(final PackageWrapper targetPackage,
-                                             final List<VirtualFile> contentSourceRoots,
+                                             final List<? extends VirtualFile> contentSourceRoots,
                                              final PsiDirectory initialDirectory) {
     Project project = targetPackage.getManager().getProject();
     //ensure that there would be no duplicates: e.g. when one content root is subfolder of another root (configured via excluded roots)
@@ -339,8 +339,8 @@ public class MoveClassesOrPackagesUtil {
   }
 
   public static void buildDirectoryList(PackageWrapper aPackage,
-                                        List<VirtualFile> contentSourceRoots,
-                                        LinkedHashSet<PsiDirectory> targetDirectories,
+                                        List<? extends VirtualFile> contentSourceRoots,
+                                        LinkedHashSet<? super PsiDirectory> targetDirectories,
                                         Map<PsiDirectory, String> relativePathsToCreate) {
 
     final PsiDirectory[] directories = aPackage.getDirectories();
index e0b113ab51693758f5e9088fbec5f498c0e07b8f..2b85fc6b83fd2cd308962748f60f080f8c0ef151 100644 (file)
@@ -77,7 +77,7 @@ public class MethodInheritanceUtils {
         return sourceClasses.toArray(PsiClass.EMPTY_ARRAY);
     }
 
-    private static void findAvailableSuperClasses(PsiMethod method, List<PsiClass> sourceClasses){
+    private static void findAvailableSuperClasses(PsiMethod method, List<? super PsiClass> sourceClasses){
         final PsiMethod[] superMethods = method.findSuperMethods(true);
         for(PsiMethod superMethod : superMethods){
             final PsiClass containingClass = superMethod.getContainingClass();
@@ -107,7 +107,7 @@ public class MethodInheritanceUtils {
         return out.toArray(PsiClass.EMPTY_ARRAY);
     }
 
-    private static void findNonLibrarySupers(PsiClass sourceClass, List<PsiClass> out){
+    private static void findNonLibrarySupers(PsiClass sourceClass, List<? super PsiClass> out){
         final PsiClass[] supers = sourceClass.getSupers();
         for(PsiClass psiClass : supers){
             if(!(psiClass instanceof PsiCompiledElement) && !out.contains(psiClass))
index 6526f70f85524250d8f969a390613152559665e1..1f7e31aeaa532707b8a03709ef6ffe36cb097781 100644 (file)
@@ -29,7 +29,7 @@ public class JavaUnresolvableLocalCollisionDetector {
   private JavaUnresolvableLocalCollisionDetector() {
   }
 
-  public static void findCollisions(final PsiElement element, final String newName, final List<UsageInfo> result) {
+  public static void findCollisions(final PsiElement element, final String newName, final List<? super UsageInfo> result) {
     if (!(element instanceof PsiLocalVariable || element instanceof PsiParameter)) {
       return;
     }
index 64fe2fd8dcf351b76954e8930a041142fdb5cff0..7965f97c5eafe651f35c7b7493a86b7217b19ebe 100644 (file)
@@ -104,7 +104,7 @@ public abstract class RenameJavaMemberProcessor extends RenamePsiElementProcesso
     return ref;
   }
 
-  protected static void findMemberHidesOuterMemberCollisions(final PsiMember member, final String newName, final List<UsageInfo> result) {
+  protected static void findMemberHidesOuterMemberCollisions(final PsiMember member, final String newName, final List<? super UsageInfo> result) {
     if (member instanceof PsiCompiledElement) return;
     final PsiMember patternMember;
     if (member instanceof PsiMethod) {
@@ -144,7 +144,7 @@ public abstract class RenameJavaMemberProcessor extends RenamePsiElementProcesso
     }
   }
 
-  protected static void qualifyOuterMemberReferences(final List<MemberHidesOuterMemberUsageInfo> outerHides) throws IncorrectOperationException {
+  protected static void qualifyOuterMemberReferences(final List<? extends MemberHidesOuterMemberUsageInfo> outerHides) throws IncorrectOperationException {
     for (MemberHidesOuterMemberUsageInfo usage : outerHides) {
       final PsiElement element = usage.getElement();
       PsiJavaCodeReferenceElement collidingRef = (PsiJavaCodeReferenceElement)element;
@@ -237,7 +237,7 @@ public abstract class RenameJavaMemberProcessor extends RenamePsiElementProcesso
     return false;
   }
 
-  protected static void qualifyStaticImportReferences(final List<MemberHidesStaticImportUsageInfo> staticImportHides)
+  protected static void qualifyStaticImportReferences(final List<? extends MemberHidesStaticImportUsageInfo> staticImportHides)
       throws IncorrectOperationException {
     for (MemberHidesStaticImportUsageInfo info : staticImportHides) {
       final PsiReference ref = info.getReference();
index 9acb5505b274f7ea5aec3d8e11471ab4ff3e2e05..cd03a1b13068c52e936dbed4e0957fe6b3e19e57 100644 (file)
@@ -36,19 +36,19 @@ import java.util.function.Consumer;
 public class RefactoringConflictsUtil {
   private RefactoringConflictsUtil() { }
 
-  public static void analyzeAccessibilityConflicts(@NotNull Set<PsiMember> membersToMove,
+  public static void analyzeAccessibilityConflicts(@NotNull Set<? extends PsiMember> membersToMove,
                                                    @NotNull PsiClass targetClass,
                                                    @NotNull MultiMap<PsiElement, String> conflicts,
                                                    @Nullable String newVisibility) {
     analyzeAccessibilityConflicts(membersToMove, targetClass, conflicts, newVisibility, targetClass, null);
   }
 
-  public static void analyzeAccessibilityConflicts(@NotNull Set<PsiMember> membersToMove,
+  public static void analyzeAccessibilityConflicts(@NotNull Set<? extends PsiMember> membersToMove,
                                                    @Nullable PsiClass targetClass,
                                                    @NotNull MultiMap<PsiElement, String> conflicts,
                                                    @Nullable String newVisibility,
                                                    @NotNull PsiElement context,
-                                                   @Nullable Set<PsiMethod> abstractMethods) {
+                                                   @Nullable Set<? extends PsiMethod> abstractMethods) {
     if (VisibilityUtil.ESCALATE_VISIBILITY.equals(newVisibility)) { //Still need to check for access object
       newVisibility = PsiModifier.PUBLIC;
     }
@@ -124,8 +124,8 @@ public class RefactoringConflictsUtil {
 
   public static void checkUsedElements(PsiMember member,
                                      PsiElement scope,
-                                     @NotNull Set<PsiMember> membersToMove,
-                                     @Nullable Set<PsiMethod> abstractMethods,
+                                     @NotNull Set<? extends PsiMember> membersToMove,
+                                     @Nullable Set<? extends PsiMethod> abstractMethods,
                                      @Nullable PsiClass targetClass,
                                      @NotNull PsiElement context,
                                      MultiMap<PsiElement, String> conflicts) {
@@ -134,8 +134,8 @@ public class RefactoringConflictsUtil {
 
   public static void checkUsedElements(PsiMember member,
                                        PsiElement scope,
-                                       @NotNull Set<PsiMember> membersToMove,
-                                       @Nullable Set<PsiMethod> abstractMethods,
+                                       @NotNull Set<? extends PsiMember> membersToMove,
+                                       @Nullable Set<? extends PsiMethod> abstractMethods,
                                        @Nullable PsiClass targetClass,
                                        PsiClass accessClass,
                                        @NotNull PsiElement context,
index d42aa946f7de67e75680415bf8dda896f6e9fe06..b5b53425e10db5c2c9913e1f9f77e4ae08b03ae7 100644 (file)
@@ -199,7 +199,7 @@ public class RefactoringHierarchyUtil {
     return result.toArray(PsiClass.EMPTY_ARRAY);
   }
 
-  private static void _findImplementingClasses(PsiClass anInterface, final Set<PsiClass> visited, final Collection<PsiClass> result) {
+  private static void _findImplementingClasses(PsiClass anInterface, final Set<? super PsiClass> visited, final Collection<? super PsiClass> result) {
     LOG.assertTrue(anInterface.isInterface());
     visited.add(anInterface);
     ClassInheritorsSearch.search(anInterface, false).forEach(new PsiElementProcessorAdapter<>(new PsiElementProcessor<PsiClass>() {
index ad83316dcf2034a01e8e4e5bdd7d2f41ef8e9cb8..02ba63c26c4c3745f5e396e2265d52e5ea140c66 100644 (file)
@@ -765,7 +765,7 @@ public class RefactoringUtil {
   }
 
   public static void replaceMovedMemberTypeParameters(final PsiElement member,
-                                                      final Iterable<PsiTypeParameter> parametersIterable,
+                                                      final Iterable<? extends PsiTypeParameter> parametersIterable,
                                                       final PsiSubstitutor substitutor,
                                                       final PsiElementFactory factory) {
     final Map<PsiElement, PsiElement> replacement = new LinkedHashMap<>();
@@ -1125,7 +1125,7 @@ public class RefactoringUtil {
    * @param initialRelation
    * @return subset of graph.getVertices()
    */
-  public static <T> Set<T> transitiveClosure(Graph<T> graph, Condition<T> initialRelation) {
+  public static <T> Set<T> transitiveClosure(Graph<T> graph, Condition<? super T> initialRelation) {
     Set<T> result = new HashSet<>();
 
     final Set<T> vertices = graph.getVertices();
@@ -1199,20 +1199,20 @@ public class RefactoringUtil {
     return dataElements[0].getText();
   }
 
-  public static void fixJavadocsForParams(PsiMethod method, Set<PsiParameter> newParameters) throws IncorrectOperationException {
+  public static void fixJavadocsForParams(PsiMethod method, Set<? extends PsiParameter> newParameters) throws IncorrectOperationException {
     fixJavadocsForParams(method, newParameters, Conditions.alwaysFalse());
   }
 
   public static void fixJavadocsForParams(PsiMethod method,
-                                        Set<PsiParameter> newParameters,
-                                        Condition<Pair<PsiParameter, String>> eqCondition) throws IncorrectOperationException {
+                                          Set<? extends PsiParameter> newParameters,
+                                          Condition<? super Pair<PsiParameter, String>> eqCondition) throws IncorrectOperationException {
     fixJavadocsForParams(method, newParameters, eqCondition, Conditions.alwaysTrue());
   }
 
   public static void fixJavadocsForParams(PsiMethod method,
-                                          Set<PsiParameter> newParameters,
-                                          Condition<Pair<PsiParameter, String>> eqCondition,
-                                          Condition<String> matchedToOldParam) throws IncorrectOperationException {
+                                          Set<? extends PsiParameter> newParameters,
+                                          Condition<? super Pair<PsiParameter, String>> eqCondition,
+                                          Condition<? super String> matchedToOldParam) throws IncorrectOperationException {
     final PsiDocComment docComment = method.getDocComment();
     if (docComment == null) return;
     final PsiParameter[] parameters = method.getParameterList().getParameters();
@@ -1403,7 +1403,7 @@ public class RefactoringUtil {
 
   @Nullable
   public static PsiTypeParameterList createTypeParameterListWithUsedTypeParameters(@Nullable final PsiTypeParameterList fromList,
-                                                                                   Condition<PsiTypeParameter> filter,
+                                                                                   Condition<? super PsiTypeParameter> filter,
                                                                                    @NotNull final PsiElement... elements) {
     if (elements.length == 0) return null;
     final Set<PsiTypeParameter> used = new HashSet<>();
index 095e9ba43469906f4ffa0a7e19b73d4921b45671..9d31b55241bc9330b052e6c7ed0e869861125ec9 100644 (file)
@@ -136,7 +136,7 @@ public class MethodDuplicatesHandler implements RefactoringActionHandler, Contex
     invokeOnScope(project, Collections.singleton(member), scope, false);
   }
 
-  public static void invokeOnScope(final Project project, final Set<PsiMember> members, final AnalysisScope scope, boolean silent) {
+  public static void invokeOnScope(final Project project, final Set<? extends PsiMember> members, final AnalysisScope scope, boolean silent) {
     final Map<PsiMember, List<Match>> duplicates = new HashMap<>();
     final int fileCount = scope.getFileCount();
     final ProgressIndicator progressIndicator = ProgressManager.getInstance().getProgressIndicator();
@@ -214,7 +214,7 @@ public class MethodDuplicatesHandler implements RefactoringActionHandler, Contex
     }
   }
 
-  public static void replaceDuplicate(final Project project, final Map<PsiMember, List<Match>> duplicates, final Set<PsiMember> methods) {
+  public static void replaceDuplicate(final Project project, final Map<PsiMember, List<Match>> duplicates, final Set<? extends PsiMember> methods) {
     final ProgressIndicator progressIndicator = ProgressManager.getInstance().getProgressIndicator();
     if (progressIndicator != null && progressIndicator.isCanceled()) return;
 
index 15b952ab4186ba9901bee0785709e54fbe11d946..e241d56bf38fe177f94c62fd849b3df2b529ef44 100644 (file)
@@ -133,7 +133,7 @@ public class TestIntegrationUtils {
                                            final PsiClass targetClass,
                                            final PsiMethod method,
                                            @Nullable String name,
-                                           boolean automatic, Set<String> existingNames) {
+                                           boolean automatic, Set<? super String> existingNames) {
     runTestMethodTemplate(methodKind, framework, editor, targetClass, null, method, name, automatic, existingNames);
   }
 
@@ -145,7 +145,7 @@ public class TestIntegrationUtils {
                                            final PsiMethod method,
                                            @Nullable String name,
                                            boolean automatic,
-                                           Set<String> existingNames) {
+                                           Set<? super String> existingNames) {
     runTestMethodTemplate(editor, targetClass, method, automatic,
                           createTestMethodTemplate(methodKind, framework, targetClass, sourceClass, name, automatic, existingNames));
   }
@@ -195,7 +195,7 @@ public class TestIntegrationUtils {
                                                   @NotNull PsiClass targetClass,
                                                   @Nullable String name,
                                                   boolean automatic,
-                                                  Set<String> existingNames) {
+                                                  Set<? super String> existingNames) {
     return createTestMethodTemplate(methodKind, descriptor, targetClass, null, name, automatic, existingNames);
   }
 
@@ -205,7 +205,7 @@ public class TestIntegrationUtils {
                                                   @Nullable PsiClass sourceClass,
                                                   @Nullable String name,
                                                   boolean automatic,
-                                                  Set<String> existingNames) {
+                                                  Set<? super String> existingNames) {
     FileTemplateDescriptor templateDesc = methodKind.getFileTemplateDescriptor(descriptor);
     String templateName = templateDesc.getFileName();
     FileTemplate fileTemplate = FileTemplateManager.getInstance(targetClass.getProject()).getCodeTemplate(templateName);
index 334e634ddae27c59cb6bd2492300542e3e612669..c9b2fcf068fcd87c2911d392de9b22dd48c99cf2 100644 (file)
@@ -183,7 +183,7 @@ public class CreateTestAction extends PsiElementBaseIntentionAction {
    * @deprecated use {@link #computeTestRoots(Module)} instead
    */
   @Deprecated
-  protected static void checkForTestRoots(Module srcModule, Set<VirtualFile> testFolders) {
+  protected static void checkForTestRoots(Module srcModule, Set<? super VirtualFile> testFolders) {
     testFolders.addAll(computeTestRoots(srcModule));
   }
 
index 090477da34ea7ca7909a4b30e963fc0b2b58812b..30f21053b22bedf5cab600db183cab10c0537922 100644 (file)
@@ -196,7 +196,7 @@ public class JavaTestGenerator implements TestGenerator {
   public static void addTestMethods(Editor editor,
                                     PsiClass targetClass,
                                     final TestFramework descriptor,
-                                    Collection<MemberInfo> methods,
+                                    Collection<? extends MemberInfo> methods,
                                     boolean generateBefore,
                                     boolean generateAfter) throws IncorrectOperationException {
     addTestMethods(editor, targetClass, null, descriptor, methods, generateBefore, generateAfter);
@@ -206,7 +206,7 @@ public class JavaTestGenerator implements TestGenerator {
                                     PsiClass targetClass,
                                     @Nullable PsiClass sourceClass,
                                     final TestFramework descriptor,
-                                    Collection<MemberInfo> methods,
+                                    Collection<? extends MemberInfo> methods,
                                     boolean generateBefore,
                                     boolean generateAfter) throws IncorrectOperationException {
     final Set<String> existingNames = new HashSet<>();
@@ -242,7 +242,7 @@ public class JavaTestGenerator implements TestGenerator {
                                           @Nullable PsiClass sourceClass,
                                           Editor editor,
                                           @Nullable String name,
-                                          Set<String> existingNames, PsiMethod anchor) {
+                                          Set<? super String> existingNames, PsiMethod anchor) {
     PsiMethod dummyMethod = TestIntegrationUtils.createDummyMethod(targetClass);
     PsiMethod method = (PsiMethod)(anchor == null ? targetClass.add(dummyMethod) : targetClass.addAfter(dummyMethod, anchor));
     PsiDocumentManager.getInstance(targetClass.getProject()).doPostponedOperationsAndUnblockDocument(editor.getDocument());
index c71bf4a9028e5d101f58c2a609fc5798561a693c..d3b718278b914683c6b221e6377d290d07d0cce8 100644 (file)
@@ -116,7 +116,7 @@ public class ThreadDumpParser {
     return null;
   }
 
-  public static void sortThreads(List<ThreadState> result) {
+  public static void sortThreads(List<? extends ThreadState> result) {
     Collections.sort(result, (o1, o2) -> getInterestLevel(o2) - getInterestLevel(o1));
   }
 
index e611734d2dbfe3aa3a9bc4ca8266b442bd8d51e4..81c5e69837d6c22756993507f695091854a8ae0a 100644 (file)
@@ -69,7 +69,7 @@ public class AllClassesSearch extends ExtensibleQueryFactory<PsiClass, AllClasse
   }
 
   @NotNull
-  public static Query<PsiClass> search(@NotNull SearchScope scope, @NotNull Project project, @NotNull Condition<String> shortNameCondition) {
+  public static Query<PsiClass> search(@NotNull SearchScope scope, @NotNull Project project, @NotNull Condition<? super String> shortNameCondition) {
     return INSTANCE.createQuery(new SearchParameters(scope, project, shortNameCondition));
   }
 }
\ No newline at end of file
index 0fc591361e010c0960a1d8b2905217901a0c0797..d268c63a48ea5ddb37bd3dc3a7b60885da0f6e34 100644 (file)
@@ -368,7 +368,7 @@ public class AnnotationUtil {
   @NotNull
   public static PsiAnnotation[] getAllAnnotations(@NotNull PsiModifierListOwner owner,
                                                   boolean inHierarchy,
-                                                  @Nullable Set<PsiModifierListOwner> visited) {
+                                                  @Nullable Set<? super PsiModifierListOwner> visited) {
     return getAllAnnotations(owner, inHierarchy, visited, true);
   }
 
index 2b78363706d00b46fd1b6b68ff2c44191d752001..48e725c60216abbc62cdeee424e7391a5542a93c 100644 (file)
@@ -22,6 +22,8 @@ import org.jetbrains.annotations.NonNls;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
+import java.util.List;
+
 /**
  * @author peter
  */
index 7a634c3ecb8599ff2c91ed82124b7682f6a608ee..6ff8e44d5b0402802d58fd1bd2d45a3f94c7ef38 100644 (file)
@@ -156,7 +156,7 @@ public class PsiMethodReferenceUtil {
   private static boolean isReturnTypeCompatible(PsiMethodReferenceExpression expression,
                                                 JavaResolveResult result,
                                                 PsiType functionalInterfaceType,
-                                                Ref<String> errorMessage) {
+                                                Ref<? super String> errorMessage) {
     final PsiClassType.ClassResolveResult resolveResult = PsiUtil.resolveGenericsClassInType(functionalInterfaceType);
     final PsiMethod interfaceMethod = LambdaUtil.getFunctionalInterfaceMethod(resolveResult);
     if (interfaceMethod != null) {
index 233d7ee1e1dfcbd0a3c0dbf637174d02ee64f016..29d64c7abc54aa095878b375e96593bf1a6732fc 100644 (file)
@@ -68,7 +68,7 @@ public abstract class PsiAugmentProvider {
   //<editor-fold desc="API and the inner kitchen.">
 
   @NotNull
-  public static <Psi extends PsiElement> List<Psi> collectAugments(@NotNull PsiElement element, @NotNull Class<Psi> type) {
+  public static <Psi extends PsiElement> List<Psi> collectAugments(@NotNull PsiElement element, @NotNull Class<? extends Psi> type) {
     List<Psi> result = ContainerUtil.newSmartList();
 
     forEach(element.getProject(), provider -> {
index 79115689e258815639993149772112507daac565..7d66e5454dfaef849de5e32e301ea584119082b3 100644 (file)
@@ -43,7 +43,7 @@ public class InheritanceUtil {
     return manager.areElementsEquivalent(baseClass, aClass) || aClass.isInheritor(baseClass, checkDeep);
   }
 
-  public static boolean processSupers(@Nullable PsiClass aClass, boolean includeSelf, @NotNull Processor<PsiClass> superProcessor) {
+  public static boolean processSupers(@Nullable PsiClass aClass, boolean includeSelf, @NotNull Processor<? super PsiClass> superProcessor) {
     if (aClass == null) return true;
 
     if (includeSelf && !superProcessor.process(aClass)) return false;
@@ -104,7 +104,7 @@ public class InheritanceUtil {
    * @param results
    * @param includeNonProject
    */
-  public static void getSuperClasses(@NotNull PsiClass aClass, @NotNull Set<PsiClass> results, boolean includeNonProject) {
+  public static void getSuperClasses(@NotNull PsiClass aClass, @NotNull Set<? super PsiClass> results, boolean includeNonProject) {
     getSuperClassesOfList(aClass.getSuperTypes(), results, includeNonProject, new THashSet<>(), aClass.getManager());
   }
 
index bd3acb6f47c2c0dce1a545ce02de81997a1d4854..8f3f14fb32c5cad5afad2430cfb21b41e62c44e2 100644 (file)
@@ -29,7 +29,7 @@ import static com.intellij.psi.CommonClassNames.JAVA_LANG_STRING;
 public class PsiConcatenationUtil {
 
   public static void buildFormatString(PsiExpression expression, StringBuilder formatString,
-                                       List<PsiExpression> formatParameters, boolean printfFormat) {
+                                       List<? super PsiExpression> formatParameters, boolean printfFormat) {
     if (expression instanceof PsiLiteralExpression) {
       final PsiLiteralExpression literalExpression = (PsiLiteralExpression) expression;
       final String text = String.valueOf(literalExpression.getValue());
index e9529a5944efab3e307e52dd3a8cca5bc8b6d399..2b3801402a514b60bbfc38cfafd02ce2fafe3c09 100644 (file)
@@ -73,7 +73,7 @@ public class JavaPsiConstructorUtil {
     return findConstructorInSuper(constructor, new HashSet<>());
   }
 
-  private static PsiMethod findConstructorInSuper(PsiMethod constructor, Set<PsiMethod> visited) {
+  private static PsiMethod findConstructorInSuper(PsiMethod constructor, Set<? super PsiMethod> visited) {
     if (visited.contains(constructor)) return null;
     visited.add(constructor);
     PsiMethodCallExpression call = findThisOrSuperCallInConstructor(constructor);
index adbeda77d7b47b8e251da05376b4654a22c4f4ef..9b4d02e50fd39b6483078736ab98f4dec3567e63 100644 (file)
@@ -53,7 +53,7 @@ public class ExceptionUtil {
   }
 
   @NotNull
-  private static List<PsiClassType> filterOutUncheckedExceptions(@NotNull List<PsiClassType> exceptions) {
+  private static List<PsiClassType> filterOutUncheckedExceptions(@NotNull List<? extends PsiClassType> exceptions) {
     List<PsiClassType> array = ContainerUtil.newArrayList();
     for (PsiClassType exception : exceptions) {
       if (!isUncheckedException(exception)) array.add(exception);
@@ -215,7 +215,7 @@ public class ExceptionUtil {
     return result;
   }
 
-  private static void addExceptions(@NotNull List<PsiClassType> array, @NotNull Collection<PsiClassType> exceptions) {
+  private static void addExceptions(@NotNull List<PsiClassType> array, @NotNull Collection<? extends PsiClassType> exceptions) {
     for (PsiClassType exception : exceptions) {
       addException(array, exception);
     }
@@ -505,7 +505,7 @@ public class ExceptionUtil {
     return getUnhandledExceptions(method, methodCall, topElement, substitutor);
   }
 
-  public static void retainExceptions(List<PsiClassType> ex, List<PsiClassType> thrownEx) {
+  public static void retainExceptions(List<PsiClassType> ex, List<? extends PsiClassType> thrownEx) {
     final List<PsiClassType> replacement = new ArrayList<>();
     for (Iterator<PsiClassType> iterator = ex.iterator(); iterator.hasNext(); ) {
       PsiClassType classType = iterator.next();
@@ -904,7 +904,7 @@ public class ExceptionUtil {
     return false;
   }
 
-  public static void sortExceptionsByHierarchy(@NotNull List<PsiClassType> exceptions) {
+  public static void sortExceptionsByHierarchy(@NotNull List<? extends PsiClassType> exceptions) {
     if (exceptions.size() <= 1) return;
     sortExceptionsByHierarchy(exceptions.subList(1, exceptions.size()));
     for (int i=0; i<exceptions.size()-1;i++) {
index 3676a46a013fd97a840fb86025a31bd379f5a1ba..737bacfd4e00d49f596fa947cb914e9c12a98229 100644 (file)
@@ -71,7 +71,7 @@ public abstract class NonClasspathClassFinder extends PsiElementFinder {
   }
 
   @NotNull
-  protected static PackageDirectoryCache createCache(@NotNull final List<VirtualFile> roots) {
+  protected static PackageDirectoryCache createCache(@NotNull final List<? extends VirtualFile> roots) {
     final MultiMap<String, VirtualFile> map = MultiMap.create();
     map.putValues("", roots);
     return new PackageDirectoryCache(map);
index d9785338ae4b51996a379f45919e709a872cc7fd..2e91d2d88e1a355202c48df1332b717a07369235 100644 (file)
@@ -23,11 +23,11 @@ import java.util.*;
 
 
 public class InferenceVariablesOrder {
-  public static List<InferenceVariable> resolveOrder(Collection<InferenceVariable> vars, InferenceSession session) {
+  public static List<InferenceVariable> resolveOrder(Collection<? extends InferenceVariable> vars, InferenceSession session) {
     return resolveOrderIterator(vars, session).next();
   }
   
-  public static Iterator<List<InferenceVariable>> resolveOrderIterator(Collection<InferenceVariable> vars, InferenceSession session) {
+  public static Iterator<List<InferenceVariable>> resolveOrderIterator(Collection<? extends InferenceVariable> vars, InferenceSession session) {
     Map<InferenceVariable, InferenceGraphNode<InferenceVariable>> nodes =
       new LinkedHashMap<>();
     for (InferenceVariable var : vars) {
@@ -49,7 +49,7 @@ public class InferenceVariablesOrder {
     return ContainerUtil.map(acyclicNodes, node -> node.getValue()).iterator();
   }
 
-  public static <T> List<List<InferenceGraphNode<T>>> tarjan(Collection<InferenceGraphNode<T>> nodes) {
+  public static <T> List<List<InferenceGraphNode<T>>> tarjan(Collection<? extends InferenceGraphNode<T>> nodes) {
     final ArrayList<List<InferenceGraphNode<T>>> result = new ArrayList<>();
     final Stack<InferenceGraphNode<T>> currentStack = new Stack<>();
     int index = 0;
@@ -61,7 +61,7 @@ public class InferenceVariablesOrder {
     return result;
   }
 
-  public static <T> ArrayList<InferenceGraphNode<T>> initNodes(Collection<InferenceGraphNode<T>> allNodes) {
+  public static <T> ArrayList<InferenceGraphNode<T>> initNodes(Collection<? extends InferenceGraphNode<T>> allNodes) {
     final List<List<InferenceGraphNode<T>>> nodes = tarjan(allNodes);
     final ArrayList<InferenceGraphNode<T>> acyclicNodes = new ArrayList<>();
     for (List<InferenceGraphNode<T>> cycle : nodes) {
@@ -94,8 +94,8 @@ public class InferenceVariablesOrder {
     }
 
 
-    private static <T> InferenceGraphNode<T> merge(final List<InferenceGraphNode<T>> cycle,
-                                                   final Collection<InferenceGraphNode<T>> allNodes) {
+    private static <T> InferenceGraphNode<T> merge(final List<? extends InferenceGraphNode<T>> cycle,
+                                                   final Collection<? extends InferenceGraphNode<T>> allNodes) {
       assert !cycle.isEmpty();
       final InferenceGraphNode<T> root = cycle.get(0);
       if (cycle.size() > 1) {
@@ -140,7 +140,7 @@ public class InferenceVariablesOrder {
     private static <T> int strongConnect(InferenceGraphNode<T> currentNode,
                                          int index,
                                          Stack<InferenceGraphNode<T>> currentStack,
-                                         ArrayList<List<InferenceGraphNode<T>>> result) {
+                                         ArrayList<? super List<InferenceGraphNode<T>>> result) {
       currentNode.index = index;
       currentNode.lowlink = index;
       index++;
index 07383c44d6363746342f234e1aed8889d25e5be6..5e1d5ffebb454385f42c26c422fa2f6bb03bb01b 100644 (file)
@@ -153,11 +153,11 @@ public abstract class JspSpiUtil {
     return urls;
   }
 
-  public static void processClassPathItems(final VirtualFile virtualFile, final Module module, final Consumer<VirtualFile> consumer) {
+  public static void processClassPathItems(final VirtualFile virtualFile, final Module module, final Consumer<? super VirtualFile> consumer) {
     processClassPathItems(virtualFile, module, consumer, true);
   }
 
-  public static void processClassPathItems(final VirtualFile virtualFile, final Module module, final Consumer<VirtualFile> consumer,
+  public static void processClassPathItems(final VirtualFile virtualFile, final Module module, final Consumer<? super VirtualFile> consumer,
                                            boolean includeModuleOutput) {
     if (isJarFile(virtualFile)){
       consumer.consume(virtualFile);
@@ -181,7 +181,7 @@ public abstract class JspSpiUtil {
     }
   }
 
-  private static void addUrl(List<URL> urls, VirtualFile file) {
+  private static void addUrl(List<? super URL> urls, VirtualFile file) {
     if (file == null || !file.isValid()) return;
     final URL url = getUrl(file);
     if (url != null) {
index dc684eb286c24d0c94af067e6af8c9581ee2e037..f89100fec08580f8574bc33faea58116890d4bff 100644 (file)
@@ -212,7 +212,7 @@ public class FluentIterableConversionUtil {
     }
 
     private static boolean determineType(PsiExpression retValue,
-                                         List<Pair<PsiExpression, Boolean>> iterableReturnValues,
+                                         List<? super Pair<PsiExpression, Boolean>> iterableReturnValues,
                                          PsiClass iterable,
                                          PsiClass collection) {
       if (retValue == null) return false;
index 116f3a4bb0b3f75b2bc5eb0bdfcff1419312b04f..0146080756d897fffa1cef42f869f0c54be71c5a 100644 (file)
@@ -38,12 +38,12 @@ public class JavacMain {
   public static final String JAVA_RUNTIME_VERSION = System.getProperty("java.runtime.version");
 
   public static boolean compile(Collection<String> options,
-                                final Collection<File> sources,
-                                Collection<File> classpath,
+                                final Collection<? extends File> sources,
+                                Collection<? extends File> classpath,
                                 Collection<File> platformClasspath,
-                                Collection<File> modulePath,
-                                Collection<File> upgradeModulePath,
-                                Collection<File> sourcePath,
+                                Collection<? extends File> modulePath,
+                                Collection<? extends File> upgradeModulePath,
+                                Collection<? extends File> sourcePath,
                                 Map<File, Set<File>> outputDirToRoots,
                                 final DiagnosticOutputConsumer diagnosticConsumer,
                                 final OutputFileConsumer outputSink,
@@ -225,7 +225,7 @@ public class JavacMain {
     return false;
   }
 
-  private static void setModulePath(JavacFileManager fileManager, String option, Collection<File> path) throws IOException {
+  private static void setModulePath(JavacFileManager fileManager, String option, Collection<? extends File> path) throws IOException {
     JavaFileManager.Location location = StandardLocation.locationFor(option);
     if (location != null) { // if this option is supported
       fileManager.setLocation(location, path);
index 76eac1d5dc5fdd08fb88f7124b53630b7d5a09e1..c6e7a5e8fba80c9e379c42b0b611365b01d01411 100644 (file)
@@ -28,12 +28,12 @@ public class JavacProtoUtil {
   }
 
   public static JavacRemoteProto.Message.Request createCompilationRequest(List<String> options,
-                                                                          Collection<File> files,
-                                                                          Collection<File> classpath,
-                                                                          Collection<File> platformCp,
-                                                                          Collection<File> modulePath,
-                                                                          Collection<File> upgradeModulePath,
-                                                                          Collection<File> sourcePath,
+                                                                          Collection<? extends File> files,
+                                                                          Collection<? extends File> classpath,
+                                                                          Collection<? extends File> platformCp,
+                                                                          Collection<? extends File> modulePath,
+                                                                          Collection<? extends File> upgradeModulePath,
+                                                                          Collection<? extends File> sourcePath,
                                                                           Map<File, Set<File>> outs) {
     final JavacRemoteProto.Message.Request.Builder builder = JavacRemoteProto.Message.Request.newBuilder();
     builder.setRequestType(JavacRemoteProto.Message.Request.Type.COMPILE);
index 717f702919e568d05d50f1abd6a6c3d2196abdd7..68db6f00bec64c2a15f390f24773af879f27a394 100644 (file)
@@ -22,9 +22,9 @@ public class BackwardReferenceIndexUtil {
 
   static void registerFile(String filePath,
                            TObjectIntHashMap<? extends JavacRef> refs,
-                           Collection<JavacDef> defs,
-                           Collection<JavacTypeCast> casts,
-                           Collection<JavacRef> implicitToString,
+                           Collection<? extends JavacDef> defs,
+                           Collection<? extends JavacTypeCast> casts,
+                           Collection<? extends JavacRef> implicitToString,
                            final JavaBackwardReferenceIndexWriter writer) {
 
     try {
index 5365afaed391ba7268fe9a0ceb34bfdea0f577f8..2c08b27a5e4c84d71b1d72e3a8dffc1ae8d35d7c 100644 (file)
@@ -61,11 +61,11 @@ public class JavaBuilderUtil {
     registerFilesToCompile(context, Collections.singleton(file));
   }
 
-  public static void registerFilesToCompile(CompileContext context, Collection<File> files) {
+  public static void registerFilesToCompile(CompileContext context, Collection<? extends File> files) {
     getFilesContainer(context, FILES_TO_COMPILE_KEY).addAll(files);
   }
 
-  public static void registerFilesWithErrors(CompileContext context, Collection<File> files) {
+  public static void registerFilesWithErrors(CompileContext context, Collection<? extends File> files) {
     getFilesContainer(context, COMPILED_WITH_ERRORS_KEY).addAll(files);
   }
 
@@ -73,7 +73,7 @@ public class JavaBuilderUtil {
     registerSuccessfullyCompiled(context, Collections.singleton(file));
   }
 
-  public static void registerSuccessfullyCompiled(CompileContext context, Collection<File> files) {
+  public static void registerSuccessfullyCompiled(CompileContext context, Collection<? extends File> files) {
     getFilesContainer(context, SUCCESSFULLY_COMPILED_FILES_KEY).addAll(files);
   }
 
index 2a1e594c0afe5c492603fafc37a631c6e788eef5..fe5a668cbd54af6b275775798314ba378720dab3 100644 (file)
@@ -56,7 +56,7 @@ public class Callbacks {
       return myAffectedFiles;
     }
 
-    public static ConstantAffection compose(final Collection<ConstantAffection> affections) {
+    public static ConstantAffection compose(final Collection<? extends ConstantAffection> affections) {
       if (affections.isEmpty()) {
         return EMPTY;
       }
index 5c231203626b64400d2b05514762806c8c6c3cfe..620faa79aa08a88da3236f3ad560496e2b98a840 100644 (file)
@@ -60,7 +60,7 @@ public class RW {
     }
   }
 
-  public static <X> void save(final Collection<X> x, final DataExternalizer<X> e, final DataOutput out) {
+  public static <X> void save(final Collection<? extends X> x, final DataExternalizer<X> e, final DataOutput out) {
     try {
       DataInputOutputUtil.writeINT(out, x.size());
 
index 5d6c67aae7cf82c66494bb150d9151a2e930674f..cbea18d9da64dced404d9e157715aba459c27c88 100644 (file)
@@ -89,7 +89,7 @@ public class ClasspathBootstrap {
     return ContainerUtil.newArrayList(cp);
   }
 
-  public static void appendJavaCompilerClasspath(Collection<String> cp, boolean includeEcj) {
+  public static void appendJavaCompilerClasspath(Collection<? super String> cp, boolean includeEcj) {
     final Class<StandardJavaFileManager> optimizedFileManagerClass = OptimizedFileManagerUtil.getManagerClass();
     if (optimizedFileManagerClass != null) {
       cp.add(getResourcePath(optimizedFileManagerClass));  // optimizedFileManager
index 3f2fbd831d446206eb33f2718d569d52b4fefed0..93792ea28240bcfb2fbe2c2efb456806a32ce24f 100644 (file)
@@ -205,7 +205,7 @@ public class BuildOperations {
     }
   }
 
-  public static boolean deleteRecursively(@NotNull String path, @NotNull Collection<String> deletedPaths, @Nullable Set<File> parentDirs) {
+  public static boolean deleteRecursively(@NotNull String path, @NotNull Collection<String> deletedPaths, @Nullable Set<? super File> parentDirs) {
     File file = new File(path);
     boolean deleted = deleteRecursively(file, deletedPaths);
     if (deleted && parentDirs != null) {
index 920d210d9646bc2138ff481975b75a5e7fc4388b..e45e7b15e67770c924f9236dd49c0f3e390a42cd 100644 (file)
@@ -202,13 +202,13 @@ public class FSOperations {
     return JpsJavaExtensionService.dependencies(module).includedIn(kind).recursivelyExportedOnly().getModules();
   }
 
-  public static void processFilesToRecompile(CompileContext context, ModuleChunk chunk, FileProcessor<JavaSourceRootDescriptor, ModuleBuildTarget> processor) throws IOException {
+  public static void processFilesToRecompile(CompileContext context, ModuleChunk chunk, FileProcessor<JavaSourceRootDescriptor, ? super ModuleBuildTarget> processor) throws IOException {
     for (ModuleBuildTarget target : chunk.getTargets()) {
       processFilesToRecompile(context, target, processor);
     }
   }
 
-  public static void processFilesToRecompile(CompileContext context, @NotNull ModuleBuildTarget target, FileProcessor<JavaSourceRootDescriptor, ModuleBuildTarget> processor) throws IOException {
+  public static void processFilesToRecompile(CompileContext context, @NotNull ModuleBuildTarget target, FileProcessor<JavaSourceRootDescriptor, ? super ModuleBuildTarget> processor) throws IOException {
     context.getProjectDescriptor().fsState.processFilesToRecompile(context, target, processor);
   }
 
index 502cfbe684a7f0fa2d1b65866f78b52983ca93ce..db8cbc29a425803af775193fefb91954ed0c94ce 100644 (file)
@@ -605,7 +605,7 @@ public class IncProjectBuilder {
   private enum Applicability {
     NONE, PARTIAL, ALL;
 
-    static <T> Applicability calculate(Predicate<T> p, Collection<T> collection) {
+    static <T> Applicability calculate(Predicate<? super T> p, Collection<? extends T> collection) {
       int count = 0;
       int item = 0;
       for (T elem : collection) {
index d8519feb4c96c5550b64071aec3a1d8bd3b03c36..83138336f60e31363e6f5be2b04c41a00eda8901 100644 (file)
@@ -99,8 +99,8 @@ public abstract class ClassProcessingBuilder extends ModuleLevelBuilder {
 
   // utility methods
   public static InstrumentationClassFinder createInstrumentationClassFinder(@Nullable JpsSdk<?> sdk,
-                                                                            Collection<File> platformCp,
-                                                                            Collection<File> cp,
+                                                                            Collection<? extends File> platformCp,
+                                                                            Collection<? extends File> cp,
                                                                             final OutputConsumer outputConsumer) throws
                                                                                                                                                                    MalformedURLException {
     final URL[] platformUrls;
index 8445afa1bdc8104d26220e25b30de5df6d798cae..713b2260e3f248b2ea6734a9c08be80c7a4ce42a 100644 (file)
@@ -854,7 +854,7 @@ public class JavaBuilder extends ModuleLevelBuilder {
   /**
    * @return true if annotation processing is enabled and corresponding options were added, false if profile is null or disabled
    */
-  public static boolean addAnnotationProcessingOptions(List<String> options, @Nullable AnnotationProcessingConfiguration profile) {
+  public static boolean addAnnotationProcessingOptions(List<? super String> options, @Nullable AnnotationProcessingConfiguration profile) {
     if (profile == null || !profile.isEnabled()) {
       options.add("-proc:none");
       return false;
index 561915cf2927b03b990dc96650be889f7ba153ea..c7535ae463aed622d2746d71ad14eb8ca48336e3 100644 (file)
@@ -43,7 +43,7 @@ public abstract class JpsJavaDependenciesEnumerationHandler {
     return handlers;
   }
 
-  public static boolean shouldProcessDependenciesRecursively(final List<JpsJavaDependenciesEnumerationHandler> handlers) {
+  public static boolean shouldProcessDependenciesRecursively(final List<? extends JpsJavaDependenciesEnumerationHandler> handlers) {
     if (handlers != null) {
       for (JpsJavaDependenciesEnumerationHandler handler : handlers) {
         if (!handler.shouldProcessDependenciesRecursively()) {
index 132f7442275e27121338f3045051f8687979a7c0..431ff0d7d1d2e94a71260fac2d40d1cee810f2c1 100644 (file)
@@ -339,7 +339,7 @@ public class JpsProjectLoader extends JpsLoaderBase {
   }
 
   @NotNull
-  public static List<JpsModule> loadModules(@NotNull List<Path> moduleFiles, @Nullable final JpsSdkType<?> projectSdkType,
+  public static List<JpsModule> loadModules(@NotNull List<? extends Path> moduleFiles, @Nullable final JpsSdkType<?> projectSdkType,
                                             @NotNull final Map<String, String> pathVariables) {
     List<JpsModule> modules = new ArrayList<>();
     List<Future<Pair<Path, Element>>> futureModuleFilesContents = new ArrayList<>();
index e5e70cb22ce3797d9ebbac7ba98cd1b299a713c7..b069841aafcf15cb3b2e42f0fb0f89d4edd559d7 100644 (file)
@@ -28,7 +28,7 @@ public abstract class CachedValueProviderOnPsiFile<T> implements CachedValueProv
   public abstract T evaluate(@NotNull PsiFile psiFile);
 
   @Nullable
-  public static <T> T getOrCompute(@NotNull PsiFile psiFile, @NotNull Function<PsiFile, T> eval, @NotNull Key<CachedValue<T>> key) {
+  public static <T> T getOrCompute(@NotNull PsiFile psiFile, @NotNull Function<? super PsiFile, ? extends T> eval, @NotNull Key<CachedValue<T>> key) {
     final CachedValueProvider<T> provider = new CachedValueProviderOnPsiFile<T>(psiFile) {
       @Override
       @Nullable
index df00ed3980dd9556cac75b93fd486be2862b2780..04c09278d4f84eada929eb4ee1b8d22e6cc93bcd 100644 (file)
@@ -92,7 +92,7 @@ public class JsonSchemaConflictNotificationProvider extends EditorNotifications.
     return files.size() > 1;
   }
 
-  public static String createMessage(@NotNull final Collection<VirtualFile> schemaFiles,
+  public static String createMessage(@NotNull final Collection<? extends VirtualFile> schemaFiles,
                                      @NotNull JsonSchemaService jsonSchemaService,
                                      @NotNull String separator,
                                      @NotNull String prefix,
index 4e63f955032f6c5c480a879fa5625752e36a5f92..945881d001d9accb46da09871d6bf22cd79834b8 100644 (file)
@@ -14,13 +14,13 @@ import java.util.Set;
 import java.util.function.Predicate;
 
 public class JvmAnalysisTestsUastUtil {
-  public static <T extends UElement> Set<T> getUElementsOfTypeFromFile(@NotNull PsiFile file, @NotNull Class<T> type) {
+  public static <T extends UElement> Set<T> getUElementsOfTypeFromFile(@NotNull PsiFile file, @NotNull Class<? extends T> type) {
     return getUElementsOfTypeFromFile(file, type, null);
   }
 
   public static <T extends UElement> Set<T> getUElementsOfTypeFromFile(@NotNull PsiFile file,
-                                                                       @NotNull Class<T> type,
-                                                                       @Nullable Predicate<T> filter) {
+                                                                       @NotNull Class<? extends T> type,
+                                                                       @Nullable Predicate<? super T> filter) {
     Set<T> result = new HashSet<>();
     PsiTreeUtil.processElements(file, new PsiElementProcessor() {
       @Override
index 784a9ef18aa2cdd61374a479b3f8e2c9dfe56b2a..1d4b88fbd6d87b0ea5861113aa48a73168b4f013 100644 (file)
@@ -25,11 +25,11 @@ public abstract class UastCallMatcherTestBase extends JavaCodeInsightFixtureTest
     moduleBuilder.addLibrary("javaUtil", PathUtil.getJarPathForClass(Locale.class));
   }
 
-  protected static int matchCallExpression(UastCallMatcher matcher, Set<UCallExpression> expressions) {
+  protected static int matchCallExpression(UastCallMatcher matcher, Set<? extends UCallExpression> expressions) {
     return (int)expressions.stream().filter(matcher::testCallExpression).count();
   }
 
-  protected static int matchCallableReferenceExpression(UastCallMatcher matcher, Set<UCallableReferenceExpression> expressions) {
+  protected static int matchCallableReferenceExpression(UastCallMatcher matcher, Set<? extends UCallableReferenceExpression> expressions) {
     return (int)expressions.stream().filter(matcher::testCallableReferenceExpression).count();
   }
 
index 6bd405106738be8f12db5bc69ccec397410b8d7a..193c96633ef48a16d13ec85a7dba9f37fa09ac42 100644 (file)
@@ -31,7 +31,7 @@ public abstract class DaemonCodeAnalyzerEx extends DaemonCodeAnalyzer {
                                           @Nullable("null means all") final HighlightSeverity minSeverity,
                                           final int startOffset,
                                           final int endOffset,
-                                          @NotNull final Processor<HighlightInfo> processor) {
+                                          @NotNull final Processor<? super HighlightInfo> processor) {
     LOG.assertTrue(ApplicationManager.getApplication().isReadAccessAllowed());
 
     final SeverityRegistrar severityRegistrar = SeverityRegistrar.getSeverityRegistrar(project);
index f3c5815cd97ac3c57556a2dc950412f60269763b..5b5aec759b1237e058aa124fe316b93fb221647f 100644 (file)
@@ -647,7 +647,7 @@ public class HighlightInfo implements Segment {
 
   private static final String ANNOTATOR_INSPECTION_SHORT_NAME = "Annotator";
 
-  private static void appendFixes(@Nullable TextRange fixedRange, @NotNull HighlightInfo info, @Nullable List<Annotation.QuickFixInfo> fixes) {
+  private static void appendFixes(@Nullable TextRange fixedRange, @NotNull HighlightInfo info, @Nullable List<? extends Annotation.QuickFixInfo> fixes) {
     if (fixes != null) {
       for (final Annotation.QuickFixInfo quickFixInfo : fixes) {
         TextRange range = fixedRange != null ? fixedRange : quickFixInfo.textRange;
index b915b38cb52047b867f465314c657c6aa4d6ec4e..dbfa8f3653cf8bfa8dc77e168a6466d8c7283dae 100644 (file)
@@ -107,7 +107,7 @@ public class UpdateHighlightersUtil {
                                              @NotNull Document document,
                                              int startOffset,
                                              int endOffset,
-                                             @NotNull Collection<HighlightInfo> highlights,
+                                             @NotNull Collection<? extends HighlightInfo> highlights,
                                              @Nullable final EditorColorsScheme colorsScheme, // if null global scheme will be used
                                              int group) {
     TextRange range = new TextRange(startOffset, endOffset);
index d9c87854ae5c70c2a12cd8e9b0acea344bcac8b8..0e596f73f97f88955b9c26cf5a082ecd3a4a53d6 100644 (file)
@@ -98,7 +98,7 @@ public class InspectionToolRegistrar implements Supplier<List<InspectionToolWrap
     throw new RuntimeException("unknown inspection class: " + profileEntry + "; "+profileEntry.getClass());
   }
 
-  private static void registerTools(@NotNull Collection<InspectionToolProvider> providers,
+  private static void registerTools(@NotNull Collection<? extends InspectionToolProvider> providers,
                                     @NotNull List<Supplier<InspectionToolWrapper>> factories) {
     for (InspectionToolProvider provider : providers) {
       //noinspection unchecked
index 6d2d94157f5dc907cd79442ba1c2d598c58a3019..802e1c9d7703b0903afd3dc78ff88cd5bd0fe9fd 100644 (file)
@@ -43,7 +43,7 @@ public class PsiEquivalenceUtil {
 
   public static boolean areElementsEquivalent(@NotNull PsiElement element1,
                                               @NotNull PsiElement element2,
-                                              @Nullable Comparator<PsiElement> resolvedElementsComparator,
+                                              @Nullable Comparator<? super PsiElement> resolvedElementsComparator,
                                               boolean areCommentsSignificant) {
     return areElementsEquivalent(element1, element2, new ReferenceComparator(resolvedElementsComparator), null, null, areCommentsSignificant);
   }
index 3358b60384db6b76f13e89f466bd6b0637892948..ce0e2ec71c1974e74c6001976fcdf4487a49f9bc 100644 (file)
@@ -378,7 +378,7 @@ public abstract class WriteCommandAction<T> extends BaseActionRunnable<T> {
    * @deprecated use {@link FileModificationService#preparePsiElementsForWrite(Collection)} (to be removed in IDEA 2018)
    */
   @Deprecated
-  public static boolean ensureFilesWritable(@NotNull Project project, @NotNull Collection<PsiFile> psiFiles) {
+  public static boolean ensureFilesWritable(@NotNull Project project, @NotNull Collection<? extends PsiFile> psiFiles) {
     return FileModificationService.getInstance().preparePsiElementsForWrite(psiFiles);
   }
 }
\ No newline at end of file
index 5f50d7a84f33fe1d115971f8244b8912476925b8..b9c5a21d0de1b46b07ed2776328853b9e0894e0d 100644 (file)
@@ -76,7 +76,7 @@ public class ServiceManager {
    * @return Key instance.
    */
   @NotNull
-  public static <T> NotNullLazyKey<T, Project> createLazyKey(@NotNull final Class<T> serviceClass) {
+  public static <T> NotNullLazyKey<T, Project> createLazyKey(@NotNull final Class<? extends T> serviceClass) {
     return NotNullLazyKey.create("Service: " + serviceClass.getName(), project -> getService(project, serviceClass));
   }
 }
index 3e3afcdf9888387bde6fe1c10d1fb7b942fcd7fc..72836229983311320f2fcb6e4a3c7cae8337637e 100644 (file)
@@ -46,7 +46,7 @@ public class ClassExtension<T> extends KeyedExtensionCollector<T, Class> {
     return buildExtensions(allSupers);
   }
 
-  private static void collectSupers(@NotNull Class classKey, @NotNull Set<String> allSupers) {
+  private static void collectSupers(@NotNull Class classKey, @NotNull Set<? super String> allSupers) {
     allSupers.add(classKey.getName());
     final Class[] interfaces = classKey.getInterfaces();
     for (final Class anInterface : interfaces) {
index 7324cd88822cf62e62d6b1fda6480844cd4a2f88..dbcfe2398eb94f8ad1916bcb236824084ca53862 100644 (file)
@@ -610,7 +610,7 @@ public class VfsUtilCore {
     return file;
   }
 
-  public static boolean processFilesRecursively(@NotNull final VirtualFile root, @NotNull final Processor<VirtualFile> processor) {
+  public static boolean processFilesRecursively(@NotNull final VirtualFile root, @NotNull final Processor<? super VirtualFile> processor) {
     final Ref<Boolean> result = Ref.create(true);
     visitChildrenRecursively(root, new VirtualFileVisitor() {
       @NotNull
@@ -734,8 +734,8 @@ public class VfsUtilCore {
   /** @deprecated does not handle recursive symlinks, use {@link #visitChildrenRecursively(VirtualFile, VirtualFileVisitor)} (to be removed in IDEA 2018) */
   @Deprecated
   public static void processFilesRecursively(@NotNull VirtualFile root,
-                                             @NotNull Processor<VirtualFile> processor,
-                                             @NotNull Convertor<VirtualFile, Boolean> directoryFilter) {
+                                             @NotNull Processor<? super VirtualFile> processor,
+                                             @NotNull Convertor<? super VirtualFile, Boolean> directoryFilter) {
     if (!processor.process(root)) return;
 
     if (root.isDirectory() && directoryFilter.convert(root)) {
index b6807a0541858e4cd470fe46482b5af0caeda8a4..5d487188dc4b749868990cc016126832c079b279 100644 (file)
@@ -156,7 +156,7 @@ public class StandardPatterns {
   }
 
   @NotNull
-  private static <E> ObjectPattern.Capture<E> composeInitialConditions(final List<InitialPatternCondition> initial) {
+  private static <E> ObjectPattern.Capture<E> composeInitialConditions(final List<? extends InitialPatternCondition> initial) {
     return new ObjectPattern.Capture<>(new InitialPatternCondition(Object.class) {
       @Override
       public boolean accepts(@Nullable final Object o, final ProcessingContext context) {
index 6baa45ddb092286a7ab1afa9d8be3ed956cc0ceb..e4a4a61f2fd3a099eb788e554225992dcac78cd1 100644 (file)
@@ -67,7 +67,7 @@ public class ElementManipulators extends ClassExtension<ElementManipulator> {
   }
 
   @NotNull
-  private static TextRange getManipulatorRange(@NotNull ElementManipulator<PsiElement> manipulator, @NotNull PsiElement element) {
+  private static TextRange getManipulatorRange(@NotNull ElementManipulator<? super PsiElement> manipulator, @NotNull PsiElement element) {
     TextRange rangeInElement = manipulator.getRangeInElement(element);
     TextRange elementRange = TextRange.from(0, element.getTextLength());
     if (!elementRange.contains(rangeInElement)) {
index f9b8552801319a38e825aa09cf27d46eb9795d5d..1e899c9ea74c32fb88e6eaf220abcc1d6e0feb88 100644 (file)
@@ -118,7 +118,7 @@ public class PsiCacheKey<T, H extends PsiElement> extends Key<SoftReference<Pair
    * @param <H>      key type
    * @return instance
    */
-  public static <T, H extends PsiElement> PsiCacheKey<T, H> create(@NonNls @NotNull String name, @NotNull Function<H, T> function) {
+  public static <T, H extends PsiElement> PsiCacheKey<T, H> create(@NonNls @NotNull String name, @NotNull Function<? super H, ? extends T> function) {
     return create(name, function, PsiModificationTracker.JAVA_STRUCTURE_MODIFICATION_COUNT);
   }
 }
index bbfa11fcc58869db42b49a6e4653a42ac4109c32..768c5f02e1530660f120f6a7774e8c6e9ab0a1a4 100644 (file)
@@ -363,12 +363,12 @@ public class PsiTreeUtil {
   }
 
   @Nullable
-  public static PsiElement findFirstParent(@Nullable PsiElement element, Condition<PsiElement> condition) {
+  public static PsiElement findFirstParent(@Nullable PsiElement element, Condition<? super PsiElement> condition) {
     return findFirstParent(element, false, condition);
   }
 
   @Nullable
-  public static PsiElement findFirstParent(@Nullable PsiElement element, boolean strict, Condition<PsiElement> condition) {
+  public static PsiElement findFirstParent(@Nullable PsiElement element, boolean strict, Condition<? super PsiElement> condition) {
     if (strict && element != null) {
       element = element.getParent();
     }
@@ -383,7 +383,7 @@ public class PsiTreeUtil {
   }
 
   @Nullable
-  public static PsiElement findFirstContext(@Nullable PsiElement element, boolean strict, Condition<PsiElement> condition) {
+  public static PsiElement findFirstContext(@Nullable PsiElement element, boolean strict, Condition<? super PsiElement> condition) {
     if (strict && element != null) {
       element = element.getContext();
     }
@@ -431,7 +431,7 @@ public class PsiTreeUtil {
   }
 
   @NotNull
-  public static <T extends PsiElement> List<T> getChildrenOfTypeAsList(@Nullable PsiElement element, @NotNull Class<T> aClass) {
+  public static <T extends PsiElement> List<T> getChildrenOfTypeAsList(@Nullable PsiElement element, @NotNull Class<? extends T> aClass) {
     if (element == null) return Collections.emptyList();
 
     List<T> result = null;
@@ -472,7 +472,7 @@ public class PsiTreeUtil {
   }
 
   @NotNull
-  public static <T extends PsiElement> List<T> getStubChildrenOfTypeAsList(@Nullable PsiElement element, @NotNull Class<T> aClass) {
+  public static <T extends PsiElement> List<T> getStubChildrenOfTypeAsList(@Nullable PsiElement element, @NotNull Class<? extends T> aClass) {
     if (element == null) return Collections.emptyList();
     StubElement<?> stub = element instanceof StubBasedPsiElement ? ((StubBasedPsiElement)element).getStub() : null;
     if (stub == null) {
@@ -720,7 +720,7 @@ public class PsiTreeUtil {
   @Nullable
   public static PsiElement findSiblingForward(@NotNull final PsiElement element,
                                               @NotNull final IElementType elementType,
-                                              @Nullable final Consumer<PsiElement> consumer) {
+                                              @Nullable final Consumer<? super PsiElement> consumer) {
     return findSiblingForward(element, elementType, true, consumer);
   }
 
@@ -741,7 +741,7 @@ public class PsiTreeUtil {
   @Nullable
   public static PsiElement findSiblingBackward(@NotNull final PsiElement element,
                                                @NotNull final IElementType elementType,
-                                               @Nullable final Consumer<PsiElement> consumer) {
+                                               @Nullable final Consumer<? super PsiElement> consumer) {
     return findSiblingBackward(element, elementType, true, consumer);
   }
 
@@ -1156,7 +1156,7 @@ public class PsiTreeUtil {
 
   public static boolean treeWalkUp(@NotNull final PsiElement entrance,
                                    @Nullable final PsiElement maxScope,
-                                   @NotNull PairProcessor<PsiElement, PsiElement> eachScopeAndLastParent) {
+                                   @NotNull PairProcessor<? super PsiElement, ? super PsiElement> eachScopeAndLastParent) {
     PsiElement prevParent = null;
     PsiElement scope = entrance;
 
index 2bca760d23f5a56b31273c99cfb6844108edcd7b..37e4de1c55dc99f33a35eaf45c270bdd36ad17fa 100644 (file)
@@ -51,7 +51,7 @@ public class FileContentUtilCore {
    *
    * @param files the files to reparse.
    */
-  public static void reparseFiles(@NotNull final Collection<VirtualFile> files) {
+  public static void reparseFiles(@NotNull final Collection<? extends VirtualFile> files) {
     ApplicationManager.getApplication().runWriteAction(() -> {
       // files must be processed under one write action to prevent firing event for invalid files.
       final Set<VFilePropertyChangeEvent> events = new THashSet<>();
index ffafe8bc557431d9a76d08d0e0b6ad5c8cc10aa7..0a351e763c9eb7d179e5aebf03fe4f90554a2bcf 100644 (file)
@@ -165,7 +165,7 @@ public class LightTreeUtil {
     return null;
   }
 
-  private static LighterASTNode findChildAtOffset(final int offset, List<LighterASTNode> children) {
+  private static LighterASTNode findChildAtOffset(final int offset, List<? extends LighterASTNode> children) {
     return ContainerUtil.find(children, node -> containsOffset(node, offset));
   }
 
index 0696b635515775151139df544bc1d243b10fd5b7..a6a60654111f27005d7f9ae98dbb03ceeb75309c 100644 (file)
@@ -103,7 +103,7 @@ public enum ThreeSide {
   }
 
   @NotNull
-  public static <T> List<T> map(@NotNull Function<ThreeSide, T> function) {
+  public static <T> List<T> map(@NotNull Function<? super ThreeSide, ? extends T> function) {
     return ContainerUtil.list(
       function.fun(LEFT),
       function.fun(BASE),