Skip to content
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

Remove unnecessary boxing for integers #1334

Conversation

hduelme
Copy link
Contributor

@hduelme hduelme commented Feb 11, 2023

Integer.valueOf returns an Integer. In this case the target type is int. So Integer.parseInt prevents unnecessary boxing.

new Integer(42) is deprecated and auto boxing will be used to convert from an int to an Integer if needed.

@gregturn gregturn changed the title remove unnecessary boxing for integers Remove unnecessary boxing for integers Apr 10, 2023
@gregturn gregturn closed this in 315eb2b Apr 10, 2023
gregturn pushed a commit that referenced this pull request Apr 10, 2023
@gregturn
Copy link
Contributor

Thanks @hduelme!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants