mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 11:50:54 +07:00
there's no need to use <? extends String>, because String is final
sometimes it's necessary, e.g. when we're substituting any generic with the real type GitOrigin-RevId: a8c453813b04213f7e24dd80bc7ccec4eb78efcb
This commit is contained in:
committed by
intellij-monorepo-bot
parent
01f2bf419b
commit
9d823ad5dd
@@ -73,7 +73,7 @@ public class IntroduceVariableTest extends LightJavaCodeInsightTestCase {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean reportConflicts(MultiMap<PsiElement,String> conflicts, final Project project, IntroduceVariableSettings dialog) {
|
||||
protected boolean reportConflicts(MultiMap<PsiElement, String> conflicts, final Project project, IntroduceVariableSettings dialog) {
|
||||
assertEquals(2, conflicts.size());
|
||||
Collection<? extends String> conflictsMessages = conflicts.values();
|
||||
assertTrue(conflictsMessages.contains("Introducing variable may break code logic"));
|
||||
|
||||
@@ -111,7 +111,7 @@ public class SsiConditional implements SsiCommand {
|
||||
/**
|
||||
* Retrieves the expression from the specified arguments and performs the necessary evaluation steps.
|
||||
*/
|
||||
private static boolean evaluateArguments(@NotNull List<? extends String> names, @NotNull String[] values, @NotNull SsiProcessingState ssiProcessingState) {
|
||||
private static boolean evaluateArguments(@NotNull List<String> names, @NotNull String[] values, @NotNull SsiProcessingState ssiProcessingState) {
|
||||
String expression = "expr".equalsIgnoreCase(names.get(0)) ? values[0] : null;
|
||||
if (expression == null) {
|
||||
throw new SsiStopProcessingException();
|
||||
|
||||
@@ -122,7 +122,7 @@ public class ModifiableWorkspace {
|
||||
}
|
||||
|
||||
public boolean isSubstituted(String libraryName) {
|
||||
return myNamesMap.values().contains(libraryName);
|
||||
return myNamesMap.containsValue(libraryName);
|
||||
}
|
||||
|
||||
public String getSubstitutedLibrary(String moduleName) {
|
||||
|
||||
@@ -57,7 +57,7 @@ public final class ConstantNode extends Expression {
|
||||
return new ConstantNode(myValue, ContainerUtil.map2Array(lookupElements, LookupElement.class, LookupElementBuilder::create));
|
||||
}
|
||||
|
||||
public ConstantNode withLookupStrings(@NotNull Collection<? extends String> lookupElements) {
|
||||
public ConstantNode withLookupStrings(@NotNull Collection<String> lookupElements) {
|
||||
return new ConstantNode(myValue, ContainerUtil.map2Array(lookupElements, LookupElement.class, LookupElementBuilder::create));
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ import org.gradle.util.GradleVersion;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.plugins.gradle.model.ExtIdeaContentRoot;
|
||||
import org.jetbrains.plugins.gradle.model.ModuleExtendedModel;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.File;
|
||||
@@ -163,22 +162,22 @@ public class ModuleExtendedModelBuilderImplTest extends AbstractModelBuilderTest
|
||||
}
|
||||
}
|
||||
|
||||
private Collection<? extends String> getAllPaths(Collection<? extends File> directories, final String moduleName) {
|
||||
private Collection<String> getAllPaths(Collection<? extends File> directories, final String moduleName) {
|
||||
List<String> list = ContainerUtil.map2List(directories, (Function<File, String>)sourceDirectory -> {
|
||||
String path =
|
||||
FileUtil.toCanonicalPath(FileUtil.getRelativePath(new File(testDir, moduleName), sourceDirectory));
|
||||
Assert.assertNotNull(path);
|
||||
assertNotNull(path);
|
||||
return path.substring(path.indexOf("/") + 1);
|
||||
});
|
||||
Collections.sort(list);
|
||||
return list;
|
||||
}
|
||||
|
||||
private Collection<? extends String> getAllPaths(DomainObjectSet<? extends IdeaSourceDirectory> directories, final String moduleName) {
|
||||
private Collection<String> getAllPaths(DomainObjectSet<? extends IdeaSourceDirectory> directories, final String moduleName) {
|
||||
List<String> list = ContainerUtil.map2List(directories, (Function<IdeaSourceDirectory, String>)sourceDirectory -> {
|
||||
String path =
|
||||
FileUtil.toCanonicalPath(FileUtil.getRelativePath(new File(testDir, moduleName), sourceDirectory.getDirectory()));
|
||||
Assert.assertNotNull(path);
|
||||
assertNotNull(path);
|
||||
return path;
|
||||
});
|
||||
Collections.sort(list);
|
||||
|
||||
@@ -17,10 +17,10 @@ public class AnnotationExprent extends Exprent {
|
||||
public static final int ANNOTATION_SINGLE_ELEMENT = 3;
|
||||
|
||||
private final String className;
|
||||
private final List<? extends String> parNames;
|
||||
private final List<String> parNames;
|
||||
private final List<? extends Exprent> parValues;
|
||||
|
||||
public AnnotationExprent(String className, List<? extends String> parNames, List<? extends Exprent> parValues) {
|
||||
public AnnotationExprent(String className, List<String> parNames, List<? extends Exprent> parValues) {
|
||||
super(EXPRENT_ANNOTATION);
|
||||
this.className = className;
|
||||
this.parNames = parNames;
|
||||
|
||||
@@ -84,7 +84,7 @@ public class BooleanValueConverter extends ResolvingConverter<String> {
|
||||
|
||||
@Override
|
||||
@NotNull
|
||||
public Collection<? extends String> getVariants(final ConvertContext context) {
|
||||
public Collection<String> getVariants(final ConvertContext context) {
|
||||
return Arrays.asList(VARIANTS);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user