Skip to content

Commit aeff664

Browse files
committed
Polishing
1 parent ba468a7 commit aeff664

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

spring-core/src/main/java/org/springframework/core/ResolvableType.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -976,8 +976,7 @@ public String toString() {
976976
if (this.resolved == null) {
977977
return "?";
978978
}
979-
if (this.type instanceof TypeVariable) {
980-
TypeVariable<?> variable = (TypeVariable<?>) this.type;
979+
if (this.type instanceof TypeVariable<?> variable) {
981980
if (this.variableResolver == null || this.variableResolver.resolveVariable(variable) == null) {
982981
// Don't bother with variable boundaries for toString()...
983982
// Can cause infinite recursions in case of self-references

spring-web/src/main/java/org/springframework/http/client/HttpComponentsClientHttpRequest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ final class HttpComponentsClientHttpRequest extends AbstractBufferingClientHttpR
5959
this.httpContext = context;
6060
}
6161

62+
6263
@Override
6364
public HttpMethod getMethod() {
6465
return HttpMethod.valueOf(this.httpRequest.getMethod());

spring-web/src/main/java/org/springframework/http/client/reactive/HttpComponentsClientHttpRequest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2020 the original author or authors.
2+
* Copyright 2002-2021 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.
@@ -39,12 +39,12 @@
3939
import org.springframework.core.io.buffer.DataBufferFactory;
4040
import org.springframework.http.HttpHeaders;
4141
import org.springframework.http.HttpMethod;
42+
import org.springframework.http.MediaType;
4243
import org.springframework.lang.Nullable;
4344

44-
import static org.springframework.http.MediaType.ALL_VALUE;
45-
4645
/**
4746
* {@link ClientHttpRequest} implementation for the Apache HttpComponents HttpClient 5.x.
47+
*
4848
* @author Martin Tarjányi
4949
* @author Arjen Poutsma
5050
* @since 5.3
@@ -125,7 +125,7 @@ protected void applyHeaders() {
125125
.forEach(entry -> entry.getValue().forEach(v -> this.httpRequest.addHeader(entry.getKey(), v)));
126126

127127
if (!this.httpRequest.containsHeader(HttpHeaders.ACCEPT)) {
128-
this.httpRequest.addHeader(HttpHeaders.ACCEPT, ALL_VALUE);
128+
this.httpRequest.addHeader(HttpHeaders.ACCEPT, MediaType.ALL_VALUE);
129129
}
130130
}
131131

0 commit comments

Comments
 (0)