-
Notifications
You must be signed in to change notification settings - Fork 325
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
Schould BigInteger be always used for integral min/max #157
Comments
@BalloonWen @jiachen1120 I thought we have made some changes on this logic. Could you please comment on this? Thanks. |
Hi @kosty , thank you for pointing this out, I found the same problem and made some changes recently,
I should have asked you for reviewing #164 since you did a lot of research and work on those parts. Please advise. 😄 |
Glad there is a resolution on this! |
@BalloonWen was playing with that part of code a bit and decided to dive a bit into performance tradeoffs. see comments in #174 Hopefully you'll find those useful |
While this comment is absolutely true. In practice it mostly plays out when JsonNode tree was constructed manually and not through jackson's
ObjectMapper
json-schema-validator/src/main/java/com/networknt/schema/MaximumValidator.java
Line 75 in 2449ee0
Generally, given that
isBigInteger
could not be trusted, should the two cases be merged into one? Original split was based on thinking thatObjectMapper
is always used to constructJsonNode
tree and allowed to save some memory by not referencing additionalBigInteger
object. Since it is not longer the case, there is little benefit in keepingcase 2
json-schema-validator/src/main/java/com/networknt/schema/MaximumValidator.java
Line 89 in 2449ee0
separate from
case 1
json-schema-validator/src/main/java/com/networknt/schema/MaximumValidator.java
Line 67 in 2449ee0
And merging them will probably be more readable
The text was updated successfully, but these errors were encountered: