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

Open
bduga opened this issue Feb 21, 2024 · 0 comments
Open

Unnecessary use of deprecated wrapper #1558

bduga opened this issue Feb 21, 2024 · 0 comments

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.

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

No branches or pull requests

1 participant