Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR removes the JsonInjector class and simplifies Jackson deserialization by removing @JacksonInject annotations that were always passing null values. The change eliminates unnecessary dependency injection complexity since IP address and network parameters were consistently null.
- Replaces JsonInjector with standard Jackson InjectableValues.Std for locales injection
- Removes @JacksonInject annotations from constructor parameters across all response models
- Deletes the JsonInjector class entirely
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/main/java/com/maxmind/geoip2/JsonInjector.java | Completely removes the JsonInjector class |
| src/main/java/com/maxmind/geoip2/WebServiceClient.java | Replaces JsonInjector with InjectableValues.Std for locales |
| src/main/java/com/maxmind/geoip2/record/Traits.java | Removes @JacksonInject from ip_address and network parameters |
| src/main/java/com/maxmind/geoip2/model/*.java | Removes @JacksonInject annotations from constructor parameters in all response models |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Contributor
Author
|
This test suggests behaviour should be as expected still: GeoIP2-java/src/test/java/com/maxmind/geoip2/WebServiceClientTest.java Lines 76 to 141 in 8c522b4 |
This was not doing much given we always passed IP and network as null. In the past, when we used Jackson for MMDB deserialization, this was more extensively used.
dc2a2a4 to
8490468
Compare
oschwald
approved these changes
Sep 26, 2025
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.
This was not doing much given we always passed IP and network as null. In the past, when we used Jackson for MMDB deserialization, this was more extensively used.