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

Unnecessary use of deprecated wrapper #1558

Closed
bduga opened this issue Feb 21, 2024 · 0 comments · Fixed by #1586
Closed

Unnecessary use of deprecated wrapper #1558

bduga opened this issue Feb 21, 2024 · 0 comments · Fixed by #1586
Assignees
Labels
status: has PR The issue is being processed in a pull request type: improvement The issue suggests an improvement of an existing feature

Comments

@bduga
Copy link

bduga commented Feb 21, 2024

this.timeInMs = new Double(timeInMs);

This is calling new Double(...) on a double and assigning it to a Double, which should no longer be necessary (auto unboxing will handle the conversion). This can now become a simple assignment:

this.timeInMs = timeInMs;

Wrapper classes were deprecated in JDK 9 and are schedule to be deleted eventually.

@rdeltour rdeltour added this to the Next maintenance release milestone Dec 26, 2024
@rdeltour rdeltour self-assigned this Dec 26, 2024
@rdeltour rdeltour added type: improvement The issue suggests an improvement of an existing feature status: has PR The issue is being processed in a pull request labels Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: has PR The issue is being processed in a pull request type: improvement The issue suggests an improvement of an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants