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

Schema.multipleOf read by jandex as NaN for some values #869

Closed
Azquelt opened this issue Aug 2, 2021 · 1 comment · Fixed by #870
Closed

Schema.multipleOf read by jandex as NaN for some values #869

Azquelt opened this issue Aug 2, 2021 · 1 comment · Fixed by #870
Labels
bug Something isn't working
Milestone

Comments

@Azquelt
Copy link
Contributor

Azquelt commented Aug 2, 2021

smallrye/jandex#114 results in double and long values from annotations being read incorrectly. This fix has been merged but isn't in a release yet.

As far as I can see, this only affects Schema.multipleOf and SchemaProperty.multipleOf which have type double.

This was raised by one of our users as OpenLiberty/open-liberty#17972 who reported that using 0.1, 0.2, 0.0001, or 1.1 resulted in a NumberFormatException since the number was read from the annotation as NaN which then could not be converted to a BigDecimal.

Can we consume the next version of jandex to get this fix when it's available please?

Specifying multipleOf=0.1 doesn't seem that unusual. I could contribute that as a test if it would be helpful.

@phillip-kruger
Copy link
Member

Hi @Azquelt - a test would be helpful, thanks.

@MikeEdgar MikeEdgar linked a pull request Aug 3, 2021 that will close this issue
@MikeEdgar MikeEdgar added blocked Resolution blocked by upstream dependency bug Something isn't working labels Aug 12, 2021
@MikeEdgar MikeEdgar removed the blocked Resolution blocked by upstream dependency label Aug 27, 2021
@MikeEdgar MikeEdgar added this to the 2.1.11 milestone Aug 29, 2021
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
None yet
Development

Successfully merging a pull request may close this issue.

3 participants