Skip to content

Align RestClientAutoConfiguration's use of PropertyMapper::asInt with the rest of the codebase #16738

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

izeye
Copy link
Contributor

@izeye izeye commented May 7, 2019

This PR removes redundant as() calls in RestClientAutoConfiguration.restClientBuilder().

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label May 7, 2019
@wilkinsona wilkinsona added type: task A general task and removed status: waiting-for-triage An issue we've not yet triaged labels May 9, 2019
@wilkinsona wilkinsona self-assigned this May 9, 2019
@wilkinsona
Copy link
Member

The proposed changes will alter the behaviour of the mapping as a long value will now be converted to an int by Number::intValue rather than Math::toIntExact. As a result, if the value is too large to fit in an int it will now become negative rather than resulting in an exception. However, I still think we should merge this as it aligns RestClientAutoConfiguration with other usages of PropertyMapper::asInt.

@wilkinsona wilkinsona changed the title Remove redundant as() calls in restClientBuilder() Align RestClientAutoConfiguration's use of PropertyMapper::asInt with the rest of the codebase May 9, 2019
@wilkinsona wilkinsona added this to the 2.2.0.M3 milestone May 9, 2019
wilkinsona pushed a commit that referenced this pull request May 9, 2019
@wilkinsona wilkinsona closed this in 89fdc85 May 9, 2019
@wilkinsona
Copy link
Member

And thanks yet again, @izeye. Please keep them coming!

@izeye izeye deleted the polish-20190508 branch May 9, 2019 14:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task A general task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants