Skip to content

Commit 89fdc85

Browse files
committed
Merge pull request #16738 from Johnny Lim
* gh-16738: Consistent use of PropertyMapper::asInt Closes gh-16738
2 parents a784697 + a56867d commit 89fdc85

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/elasticsearch/rest/RestClientAutoConfiguration.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,10 @@ public RestClientBuilder restClientBuilder(RestClientProperties properties,
7272
});
7373
builder.setRequestConfigCallback((requestConfigBuilder) -> {
7474
map.from(properties::getConnectionTimeout).whenNonNull()
75-
.as(Duration::toMillis).asInt(Math::toIntExact)
75+
.asInt(Duration::toMillis)
7676
.to(requestConfigBuilder::setConnectTimeout);
77-
map.from(properties::getReadTimeout).whenNonNull().as(Duration::toMillis)
78-
.asInt(Math::toIntExact).to(requestConfigBuilder::setSocketTimeout);
77+
map.from(properties::getReadTimeout).whenNonNull().asInt(Duration::toMillis)
78+
.to(requestConfigBuilder::setSocketTimeout);
7979
return requestConfigBuilder;
8080
});
8181
builderCustomizers.orderedStream()

0 commit comments

Comments
 (0)