Polishing

This commit is contained in:
Juergen Hoeller
2020-10-06 17:50:08 +02:00
parent 7ec6a9dc54
commit 7861cfab6c
4 changed files with 36 additions and 18 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2020 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.
@@ -185,7 +185,7 @@ public final class ResponseCookie extends HttpCookie {
* with a name-value pair and may also include attributes.
* @param name the cookie name
* @param value the cookie value
* @return the created cookie instance
* @return a builder to create the cookie with
*/
public static ResponseCookieBuilder from(final String name, final String value) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2020 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.
@@ -38,7 +38,6 @@ import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.MediaType;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
/**
* {@link ClientHttpRequest} implementation for the Jetty ReactiveStreams HTTP client.
@@ -65,9 +64,7 @@ class JettyClientHttpRequest extends AbstractClientHttpRequest {
@Override
public HttpMethod getMethod() {
HttpMethod method = HttpMethod.resolve(this.jettyRequest.getMethod());
Assert.state(method != null, "Method must not be null");
return method;
return HttpMethod.valueOf(this.jettyRequest.getMethod());
}
@Override
@@ -119,7 +116,6 @@ class JettyClientHttpRequest extends AbstractClientHttpRequest {
public void succeeded() {
DataBufferUtils.release(buffer);
}
@Override
public void failed(Throwable x) {
DataBufferUtils.release(buffer);