mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-10-09 10:59:11 +00:00
Improve null-safety of module/spring-boot-restclient
See gh-46926
This commit is contained in:
+4
-1
@@ -73,7 +73,10 @@ public class PropertiesRestClientCustomizer implements RestClientCustomizer {
|
||||
|
||||
@SuppressWarnings("NullAway") // Lambda isn't detected with the correct nullability
|
||||
private void setDefaultApiVersion(Builder builder, PropertyMapper map, AbstractRestClientProperties properties) {
|
||||
map.from(properties.getApiversion()).as(ApiversionProperties::getDefaultVersion).to(builder::defaultApiVersion);
|
||||
map.from(properties.getApiversion())
|
||||
.as(ApiversionProperties::getDefaultVersion)
|
||||
.whenNonNull()
|
||||
.to(builder::defaultApiVersion);
|
||||
}
|
||||
|
||||
private Consumer<HttpHeaders> putAllHeaders(Map<String, List<String>> defaultHeaders) {
|
||||
|
||||
Reference in New Issue
Block a user