configcat / java-sdk

ConfigCat SDK for Java. ConfigCat is a hosted feature flag service: https://configcat.com. Manage feature toggles across frontend, backend, mobile, desktop apps. Alternative to LaunchDarkly. Management app + feature flag SDKs.
https://configcat.com/docs/sdk-reference/java
MIT License
20 stars 6 forks source link

Try to keep only a single Config instance in memory #11

Closed z4kn4fein closed 2 years ago

z4kn4fein commented 2 years ago

Describe the purpose of your pull request

Trying to keep only a single Config instance in memory at once.

Requirement checklist (only if applicable)

codecov[bot] commented 2 years ago

Codecov Report

Merging #11 (b70e7d3) into master (fc4aedb) will decrease coverage by 0.07%. The diff coverage is 90.00%.

:exclamation: Current head b70e7d3 differs from pull request most recent head df5eb7c. Consider uploading reports for the commit df5eb7c to get more accurate results Impacted file tree graph

@@             Coverage Diff              @@
##             master      #11      +/-   ##
============================================
- Coverage     80.31%   80.23%   -0.08%     
  Complexity      285      285              
============================================
  Files            26       26              
  Lines           828      835       +7     
  Branches        113      107       -6     
============================================
+ Hits            665      670       +5     
- Misses          117      122       +5     
+ Partials         46       43       -3     
Impacted Files Coverage Δ
src/main/java/com/configcat/AutoPollingMode.java 100.00% <ø> (ø)
src/main/java/com/configcat/PollingModes.java 75.00% <ø> (ø)
src/main/java/com/configcat/FetchResponse.java 93.33% <66.66%> (-6.67%) :arrow_down:
src/main/java/com/configcat/ConfigJsonCache.java 85.71% <85.71%> (ø)
src/main/java/com/configcat/LazyLoadingPolicy.java 85.29% <87.50%> (-0.82%) :arrow_down:
src/main/java/com/configcat/ConfigFetcher.java 83.69% <90.90%> (+3.47%) :arrow_up:
src/main/java/com/configcat/AutoPollingPolicy.java 94.28% <100.00%> (-0.31%) :arrow_down:
src/main/java/com/configcat/ConfigCatClient.java 56.87% <100.00%> (-1.15%) :arrow_down:
src/main/java/com/configcat/ConfigModels.java 100.00% <100.00%> (+23.52%) :arrow_up:
...c/main/java/com/configcat/ManualPollingPolicy.java 100.00% <100.00%> (ø)
... and 4 more

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 fc4aedb...df5eb7c. Read the comment docs.

sonarcloud[bot] commented 2 years ago

Please retry analysis of this Pull-Request directly on SonarCloud.

kp-cat commented 2 years ago

Maybe ConfigCatClient.getKeyAndValueFromConfig() should be renamed to ConfigCatClient.getKeyAndValueFromSettingsMap() for consisntecy.