[REFACTOR] JsonInjector and NetworkDeserializer classes#607
Merged
horgh merged 4 commits intomaxmind:mainfrom Sep 28, 2025
Merged
[REFACTOR] JsonInjector and NetworkDeserializer classes#607horgh merged 4 commits intomaxmind:mainfrom
horgh merged 4 commits intomaxmind:mainfrom
Conversation
…arsing, validation, and created test classes as well
Contributor
Author
|
@horgh does this look good? |
Contributor
|
Hi @AKakkar28! Sorry I haven't had time to look at this fully yet. However while reviewing it I noticed that JsonInjector was mostly not used (note how we pass the second two parameters as null in the only use). So I made #608 to remove it. Thanks for helping us notice that! You'll need to rebase to incorporate that removal though. |
# Conflicts: # src/main/java/com/maxmind/geoip2/JsonInjector.java
Contributor
Author
|
@horgh I see got it. I have rebased and now this PR focuses on validating CIDR format and prefix (IPv4: 0–32, IPv6: 0–128) |
horgh
requested changes
Sep 27, 2025
Contributor
horgh
left a comment
There was a problem hiding this comment.
Looks good! Thanks for the tests!
I have a couple minor comments.
Contributor
Author
|
@horgh Done and I updated the test as well. Please review and approve it. |
horgh
approved these changes
Sep 28, 2025
Contributor
|
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
refactor: improve JsonInjector and NetworkDeserializer for clarity, safety and added JUnit tests as well
@horgh
These are my changes can you please review these and approve if everything looks good?
I have added test cases, made sure the build passes and not used lightweight prefix validation.
Thanks!