-
Notifications
You must be signed in to change notification settings - Fork 204
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
Configure jackson-databind to not suppress access checks. #52
Configure jackson-databind to not suppress access checks. #52
Conversation
Because of this change all model classes have now annotated constructors. This allows geoip2 to be run in secured environments without enabling suppressAccessChecks permission. Closes maxmind#51
41de1c9
to
397ef8c
Compare
@@ -23,4 +33,8 @@ public Integer getConfidence() { | |||
return this.confidence; | |||
} | |||
|
|||
public static City empty() { |
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.
Was there a particular reason you want with static factory methods for the empty objects instead of a constructor with no arguments?
Also, please add some basic documentation for these.
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.
Not really. I'll remove the static methods and add no args constructors.
@@ -7,24 +7,23 @@ | |||
*/ | |||
public class AnonymousIpResponse extends AbstractResponse { | |||
|
|||
@JsonProperty("is_anonymous") |
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.
I think this class has the same serialization issue.
|
||
@JsonProperty("ip_address") |
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.
As do all the ip_address
getters.
Overall this looks great. I had a number of small comments. |
I've updated this PR. I didn't add java docs on the constructors, because that would contain duplicated information that can be found on the getters too. |
Thanks! 👍 |
…ppress_access_checking Configure jackson-databind to not suppress access checks.
nice :) |
@oschwald Do you know when the next release is scheduled? |
I'm hoping to get to it early next week. I am waiting for internal review on #53. |
@oschwald thanks, that is great! |
This has been released. It should be on mirrors in a few hours. |
thanks @oschwald. We've upgraded to the latest version: elastic/elasticsearch#15599 |
Because of this change all model classes have now annotated constructors.
This allows geoip2 to be run in secured environments without enabling suppressAccessChecks permission.
PR for #51