Skip to content

Commit 97f9397

Browse files
authored
Use List.of for unmodifiableList (#135)
1 parent bd6dfad commit 97f9397

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/main/java/org/mapstruct/intellij/codeinsight/completion/ComponentModelCompletionContributor.java

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
*/
66
package org.mapstruct.intellij.codeinsight.completion;
77

8-
import java.util.Arrays;
9-
import java.util.Collections;
108
import java.util.List;
119

1210
import com.intellij.codeInsight.completion.CompletionContributor;
@@ -45,15 +43,10 @@ public static class ComponentModelCompletionProvider extends CompletionProvider<
4543

4644
//TODO If we can somehow get access to all the AnnotationBasedComponentModelProcessor and extract
4745
// their getComponentModelIdentifier then we can use those. I don't know how to do this within the plugin
48-
private static final List<String> COMPONENT_MODEL_TYPES = Collections.unmodifiableList( Arrays.asList(
49-
"default",
50-
"cdi",
51-
"spring",
52-
"jsr330"
53-
) );
46+
private static final List<String> COMPONENT_MODEL_TYPES = List.of( "default", "cdi", "spring", "jsr330" );
5447

5548
@Override
56-
protected void addCompletions(@NotNull CompletionParameters parameters, ProcessingContext context,
49+
protected void addCompletions(@NotNull CompletionParameters parameters, @NotNull ProcessingContext context,
5750
@NotNull CompletionResultSet result) {
5851
PsiElement position = parameters.getPosition();
5952

0 commit comments

Comments
 (0)