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

Allow exclusion of GSON dependency #3223

Merged
merged 3 commits into from
Dec 13, 2022
Merged

Conversation

agavrilov76
Copy link
Contributor

@agavrilov76 agavrilov76 commented Dec 6, 2022

Move creation of the GSON instance to a separate class which is initialized only when any of the JSON methods are being used. This allows gson transitive Maven dependency to be excluded for the applications which don't use JSON methods.

See #2961 and #2962 for more information and rationale

Move creation of the GSON instance to a separate class which is initialised only when any of the json methods are being used.
This allows GSON and org.json transitive Maven dependencies to be excluded for the applications which don't use json methods.
@sazzad16 sazzad16 added this to the 4.4.0 milestone Dec 7, 2022
Copy link
Collaborator

@sazzad16 sazzad16 left a comment

Choose a reason for hiding this comment

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

This PR addresses only Gson. Please update title and description accordingly.

@codecov-commenter
Copy link

codecov-commenter commented Dec 7, 2022

Codecov Report

Base: 66.96% // Head: 66.93% // Decreases project coverage by -0.02% ⚠️

Coverage data is based on head (a53c357) compared to base (86d800a).
Patch coverage: 57.44% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3223      +/-   ##
============================================
- Coverage     66.96%   66.93%   -0.03%     
- Complexity     4606     4611       +5     
============================================
  Files           251      253       +2     
  Lines         14864    14884      +20     
  Branches        922      923       +1     
============================================
+ Hits           9953     9962       +9     
- Misses         4511     4524      +13     
+ Partials        400      398       -2     
Impacted Files Coverage Δ
...redis/clients/jedis/params/ModuleLoadExParams.java 0.00% <0.00%> (ø)
src/main/java/redis/clients/jedis/Jedis.java 84.83% <57.14%> (-0.17%) ⬇️
src/main/java/redis/clients/jedis/GsonJson.java 75.00% <75.00%> (ø)
.../main/java/redis/clients/jedis/CommandObjects.java 85.12% <100.00%> (-0.02%) ⬇️
src/main/java/redis/clients/jedis/Protocol.java 91.87% <100.00%> (+1.25%) ⬆️
...ava/redis/clients/jedis/JedisClusterInfoCache.java 72.50% <0.00%> (+1.25%) ⬆️
...nts/jedis/providers/ClusterConnectionProvider.java 78.57% <0.00%> (+5.35%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@agavrilov76 agavrilov76 changed the title Allow exclusion of JSON dependenies Allow exclusion of GSON dependency Dec 7, 2022
@agavrilov76
Copy link
Contributor Author

This PR addresses only Gson. Please update title and description accordingly.

Done. The title and description are updated

@sazzad16 sazzad16 merged commit 8c04f10 into redis:master Dec 13, 2022
agavrilov76 added a commit to agavrilov76/jedis that referenced this pull request Dec 16, 2022
Move creation of the JSON command builders to a separate class which is initialized only when any of the JSON methods are being used. This allows org.json transitive Maven dependency to be excluded for the applications which don't use JSON methods.

See redis#2961 and redis#2962 for more information and rationale. Similar to redis#3223
sazzad16 pushed a commit that referenced this pull request Jan 11, 2023
Move creation of the JSON command builders to a separate class which is initialized only when any of the JSON methods are being used. This allows org.json transitive Maven dependency to be excluded for the applications which don't use JSON methods.

See #2961 and #2962 for more information and rationale. Similar to #3223
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants