From c211e3998b619d72752ffc2d8db89ebf62e5bd51 Mon Sep 17 00:00:00 2001 From: Arjen Poutsma Date: Thu, 18 Jan 2018 11:13:14 +0100 Subject: [PATCH] Polishing --- .../method/annotation/ResponseEntityResultHandler.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/annotation/ResponseEntityResultHandler.java b/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/annotation/ResponseEntityResultHandler.java index f8ea60718c..f3ec45f48d 100644 --- a/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/annotation/ResponseEntityResultHandler.java +++ b/spring-webflux/src/main/java/org/springframework/web/reactive/result/method/annotation/ResponseEntityResultHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -17,8 +17,9 @@ package org.springframework.web.reactive.result.method.annotation; import java.time.Instant; -import java.util.Arrays; +import java.util.EnumSet; import java.util.List; +import java.util.Set; import reactor.core.publisher.Mono; @@ -52,7 +53,7 @@ import org.springframework.web.server.ServerWebExchange; */ public class ResponseEntityResultHandler extends AbstractMessageWriterResultHandler implements HandlerResultHandler { - private static final List SAFE_METHODS = Arrays.asList(HttpMethod.GET, HttpMethod.HEAD); + private static final Set SAFE_METHODS = EnumSet.of(HttpMethod.GET, HttpMethod.HEAD); /**