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

Java Generator error: "incompatible types: int cannot be converted to java.lang.Double" #6982

Closed
thiagogcm opened this issue Mar 27, 2025 · 2 comments · Fixed by #6983
Closed

Comments

@thiagogcm
Copy link
Contributor

Describe the bug

The Java Generator Tool got everything correct except for one corner case
This CRD generates the following line:
private Double percentage = 100;

but Java does not infer it as a double unfortunately, perhaps just appending a 'd' fixes it

Fabric8 Kubernetes Client version

SNAPSHOT

Steps to reproduce

Generate Java from the CRD in the description (CLI or maven)

Expected behavior

no compilation error

Runtime

Kubernetes (vanilla)

Kubernetes API Server version

1.25.3@latest

Environment

Linux

Fabric8 Kubernetes Client Logs

Additional context

No response

@andreaTP
Copy link
Member

Hola Thiago!

Thanks for the report, I fixed the bug in #6983 , curious that is the first time that this pops up, indeed a missing handling of the case.

@thiagogcm
Copy link
Contributor Author

Thank you for looking into it so fast!

@manusa manusa added this to the 7.2.0 milestone Apr 7, 2025 — with automated-tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants