-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Fix duplicate enum constant in java generator #5611
Conversation
Can you share the actual error, or, better, a reproducer for the issue? This seems to be an effect of something else going wrong, not the root cause. Do we have duplicated fields in the CRD after the name sanitization? |
Regardless of where is the root cause, it does make sense to use a Regarding a reproducer: |
I agree, but I would really like to understand the underlying root cause before hiding it with this change. |
For reference, the bug is in a KubeVirt CRD IMHO: they have duplicated |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that the upstream bug has been solved here:
kubevirt/cluster-network-addons-operator#1748
I'm good with those changes, thanks for reporting @iocanel
Kudos, SonarCloud Quality Gate passed! 0 Bugs 100.0% Coverage The version of Java (11.0.21) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17. |
Context: Trying to create KubeVirt model from CRDs. I am hitting an error as it seems that enum constants defined in the CRD are added twice.
This pull request changes JEnum to use Set instead of List to prevent any chance of having dublicate enum constants.