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

Add non-null to store even non-default values in serialization #652

Merged
merged 1 commit into from
Aug 20, 2020
Merged

Conversation

sujithvm
Copy link
Contributor

Issue #, if available:

Description of changes:

  • Currently non-default values are ignored in serialization based on Java defaults because of which during deserialization the defaults are reset causing different values to be used.
  • For eg: if /config/audit/log_request_body is false, then it is not stored during serialization and during the deserialization, since the value is not stored, the default is reset to false.
  • JsonInclude.Include.NON_NULL will store all non-null & non-default values also
  • Added test

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@sujithvm sujithvm requested a review from a team as a code owner August 19, 2020 01:00
@codecov
Copy link

codecov bot commented Aug 19, 2020

Codecov Report

Merging #652 into master will increase coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #652      +/-   ##
============================================
+ Coverage     63.42%   63.43%   +0.01%     
- Complexity     3082     3083       +1     
============================================
  Files           234      234              
  Lines         16592    16592              
  Branches       2996     2996              
============================================
+ Hits          10523    10525       +2     
+ Misses         4529     4528       -1     
+ Partials       1540     1539       -1     
Impacted Files Coverage Δ Complexity Δ
...icsearch/security/auditlog/config/AuditConfig.java 98.85% <ø> (ø) 10.00 <0.00> (ø)
...icsearch/security/compliance/ComplianceConfig.java 79.86% <ø> (ø) 49.00 <0.00> (ø)
...security/configuration/DlsFlsFilterLeafReader.java 58.16% <0.00%> (-0.75%) 58.00% <0.00%> (ø%)
...transport/OpenDistroSecuritySSLRequestHandler.java 56.41% <0.00%> (+6.41%) 8.00% <0.00%> (+1.00%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1d69a04...4986bac. Read the comment docs.

Copy link
Contributor

@vrozov vrozov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sujithvm sujithvm merged commit 301e02e into opensearch-project:master Aug 20, 2020
sujithvm added a commit that referenced this pull request Aug 20, 2020
sujithvm added a commit that referenced this pull request Aug 20, 2020
sujithvm added a commit that referenced this pull request Aug 20, 2020
sujithvm added a commit that referenced this pull request Aug 20, 2020
sujithvm added a commit that referenced this pull request Aug 20, 2020
cliu123 referenced this pull request in cliu123/ODFE-Security Dec 21, 2020
wuychn pushed a commit to ochprince/security that referenced this pull request Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants