Skip to content

Commit c211e39

Browse files
committed
Polishing
1 parent 61d330f commit c211e39

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

spring-webflux/src/main/java/org/springframework/web/reactive/result/method/annotation/ResponseEntityResultHandler.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2017 the original author or authors.
2+
* Copyright 2002-2018 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -17,8 +17,9 @@
1717
package org.springframework.web.reactive.result.method.annotation;
1818

1919
import java.time.Instant;
20-
import java.util.Arrays;
20+
import java.util.EnumSet;
2121
import java.util.List;
22+
import java.util.Set;
2223

2324
import reactor.core.publisher.Mono;
2425

@@ -52,7 +53,7 @@
5253
*/
5354
public class ResponseEntityResultHandler extends AbstractMessageWriterResultHandler implements HandlerResultHandler {
5455

55-
private static final List<HttpMethod> SAFE_METHODS = Arrays.asList(HttpMethod.GET, HttpMethod.HEAD);
56+
private static final Set<HttpMethod> SAFE_METHODS = EnumSet.of(HttpMethod.GET, HttpMethod.HEAD);
5657

5758

5859
/**

0 commit comments

Comments
 (0)