Polishing
This commit is contained in:
parent
ba468a731f
commit
aeff664cf9
|
|
@ -976,8 +976,7 @@ public class ResolvableType implements Serializable {
|
|||
if (this.resolved == null) {
|
||||
return "?";
|
||||
}
|
||||
if (this.type instanceof TypeVariable) {
|
||||
TypeVariable<?> variable = (TypeVariable<?>) this.type;
|
||||
if (this.type instanceof TypeVariable<?> variable) {
|
||||
if (this.variableResolver == null || this.variableResolver.resolveVariable(variable) == null) {
|
||||
// Don't bother with variable boundaries for toString()...
|
||||
// Can cause infinite recursions in case of self-references
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ final class HttpComponentsClientHttpRequest extends AbstractBufferingClientHttpR
|
|||
this.httpContext = context;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public HttpMethod getMethod() {
|
||||
return HttpMethod.valueOf(this.httpRequest.getMethod());
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
* Copyright 2002-2021 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.
|
||||
|
|
@ -39,12 +39,12 @@ import org.springframework.core.io.buffer.DataBuffer;
|
|||
import org.springframework.core.io.buffer.DataBufferFactory;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.HttpMethod;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.lang.Nullable;
|
||||
|
||||
import static org.springframework.http.MediaType.ALL_VALUE;
|
||||
|
||||
/**
|
||||
* {@link ClientHttpRequest} implementation for the Apache HttpComponents HttpClient 5.x.
|
||||
*
|
||||
* @author Martin Tarjányi
|
||||
* @author Arjen Poutsma
|
||||
* @since 5.3
|
||||
|
|
@ -125,7 +125,7 @@ class HttpComponentsClientHttpRequest extends AbstractClientHttpRequest {
|
|||
.forEach(entry -> entry.getValue().forEach(v -> this.httpRequest.addHeader(entry.getKey(), v)));
|
||||
|
||||
if (!this.httpRequest.containsHeader(HttpHeaders.ACCEPT)) {
|
||||
this.httpRequest.addHeader(HttpHeaders.ACCEPT, ALL_VALUE);
|
||||
this.httpRequest.addHeader(HttpHeaders.ACCEPT, MediaType.ALL_VALUE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue