Skip to content

Commit 3fa4e41

Browse files
izeyejhoeller
authored andcommitted
Remove redundant Collections.unmodifiableList()
1 parent f0f450a commit 3fa4e41

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

spring-web/src/main/java/org/springframework/web/cors/CorsConfiguration.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,16 +57,13 @@ public class CorsConfiguration {
5757
/** Wildcard representing <em>all</em> origins, methods, or headers. */
5858
public static final String ALL = "*";
5959

60-
private static final List<String> ALL_LIST = Collections.unmodifiableList(
61-
Collections.singletonList(ALL));
60+
private static final List<String> ALL_LIST = Collections.singletonList(ALL);
6261

6362
private static final OriginPattern ALL_PATTERN = new OriginPattern("*");
6463

65-
private static final List<OriginPattern> ALL_PATTERN_LIST = Collections.unmodifiableList(
66-
Collections.singletonList(ALL_PATTERN));
64+
private static final List<OriginPattern> ALL_PATTERN_LIST = Collections.singletonList(ALL_PATTERN);
6765

68-
private static final List<String> DEFAULT_PERMIT_ALL = Collections.unmodifiableList(
69-
Collections.singletonList(ALL));
66+
private static final List<String> DEFAULT_PERMIT_ALL = Collections.singletonList(ALL);
7067

7168
private static final List<HttpMethod> DEFAULT_METHODS = Collections.unmodifiableList(
7269
Arrays.asList(HttpMethod.GET, HttpMethod.HEAD));

0 commit comments

Comments
 (0)