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

Singleton client #17

Closed novalisdenahi closed 1 year ago

novalisdenahi commented 1 year ago

Describe the purpose of your pull request

Added singleton client creation to the client via ConfigCatClient.get() . Added ConfigCatClient.closeAll() to close all singleton ConfigCatClient. ConfigCatClient(String sdkKey) is deprecated. Changed client Builder to Options.

Related issues (only if applicable)

Requirement checklist (only if applicable)

codecov[bot] commented 1 year ago

Codecov Report

Base: 80.16% // Head: 80.09% // Decreases project coverage by -0.07% :warning:

Coverage data is based on head (25ea807) compared to base (bcc4703). Patch coverage: 85.24% of modified lines in pull request are covered.

:exclamation: Current head 25ea807 differs from pull request most recent head 03e0d07. Consider uploading reports for the commit 03e0d07 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #17 +/- ## ============================================ - Coverage 80.16% 80.09% -0.08% - Complexity 290 299 +9 ============================================ Files 26 26 Lines 847 884 +37 Branches 107 113 +6 ============================================ + Hits 679 708 +29 - Misses 123 127 +4 - Partials 45 49 +4 ``` | [Impacted Files](https://codecov.io/gh/configcat/java-sdk/pull/17?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=configcat) | Coverage Δ | | |---|---|---| | [src/main/java/com/configcat/ConfigCatClient.java](https://codecov.io/gh/configcat/java-sdk/pull/17/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=configcat#diff-c3JjL21haW4vamF2YS9jb20vY29uZmlnY2F0L0NvbmZpZ0NhdENsaWVudC5qYXZh) | `60.45% <85.24%> (+2.46%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=configcat). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=configcat)

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

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

90.8% 90.8% Coverage
0.0% 0.0% Duplication