Skip to content

Fixed primitive wrapper for double to float conversion #477

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

Merged
merged 1 commit into from
Mar 12, 2025
Merged

Fixed primitive wrapper for double to float conversion #477

merged 1 commit into from
Mar 12, 2025

Conversation

ddsharpe
Copy link
Contributor

@ddsharpe ddsharpe commented Mar 12, 2025

What's changed?

Conversion of Float(double) constructor handles primitive double use case. Float.valueOf(double) does not exist.

What's your motivation?

Anything in particular you'd like reviewers to focus on?

Fix took the simplest approach to conversion of double to float and used the Java Float.java constructors as the example.

Have you considered any alternatives or workarounds?

Could not find any workarounds.

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've read and applied the recipe conventions and best practices
  • I've used the IntelliJ IDEA auto-formatter on affected files

Copy link
Member

@timtebeek timtebeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks perfect, thanks a lot for the quick work!

@github-project-automation github-project-automation bot moved this from In Progress to Ready to Review in OpenRewrite Mar 12, 2025
@timtebeek timtebeek added the bug Something isn't working label Mar 12, 2025
@timtebeek timtebeek merged commit 4b5496a into openrewrite:main Mar 12, 2025
2 checks passed
@github-project-automation github-project-automation bot moved this from Ready to Review to Done in OpenRewrite Mar 12, 2025
@ddsharpe ddsharpe deleted the float-fix branch March 12, 2025 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Float constructor replacement with Float.valueOf for double primitive
2 participants