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

chore: Updated dependencies and corrected checkstyle violations #1259

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>4.11.0</version>
<version>5.14.2</version>
<scope>test</scope>
</dependency>

Expand Down Expand Up @@ -419,7 +419,7 @@
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>8.45.1</version>
<version>10.21.0</version>
Copy link
Member

Choose a reason for hiding this comment

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

Our build is running on java 8, check style 10+ require Java 11 - I think this will not work

</dependency>
</dependencies>
<executions>
Expand Down
25 changes: 13 additions & 12 deletions src/main/java/dev/openfeature/sdk/FeatureProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,12 @@ default List<Hook> getProviderHooks() {

/**
* This method is called before a provider is used to evaluate flags. Providers
* can overwrite this method,
* if they have special initialization needed prior being called for flag
* evaluation.
* can overwrite this method, if they have special initialization needed prior
* being called for flag evaluation.
*
* <p>
* It is ok if the method is expensive as it is executed in the background. All
* runtime exceptions will be
* caught and logged.
* runtime exceptions will be caught and logged.
* </p>
*/
default void initialize(EvaluationContext evaluationContext) throws Exception {
Expand All @@ -42,13 +41,12 @@ default void initialize(EvaluationContext evaluationContext) throws Exception {

/**
* This method is called when a new provider is about to be used to evaluate
* flags, or the SDK is shut down.
* Providers can overwrite this method, if they have special shutdown actions
* needed.
* flags, or the SDK is shut down. Providers can overwrite this method, if they
* have special shutdown actions needed.
*
* <p>
* It is ok if the method is expensive as it is executed in the background. All
* runtime exceptions will be
* caught and logged.
* runtime exceptions will be caught and logged.
* </p>
*/
default void shutdown() {
Expand All @@ -60,12 +58,15 @@ default void shutdown() {
* If the provider needs to be initialized, it should return {@link ProviderState#NOT_READY}.
* If the provider is in an error state, it should return {@link ProviderState#ERROR}.
* If the provider is functioning normally, it should return {@link ProviderState#READY}.
*
* <p><i>Providers which do not implement this method are assumed to be ready immediately.</i></p>
*
* <p>
* <i>Providers which do not implement this method are assumed to be ready immediately.</i>
* </p>
*
* @return ProviderState
* @deprecated The state is handled by the SDK internally. Query the state from the {@link Client} instead.
*/

@Deprecated
default ProviderState getState() {
return ProviderState.READY;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* for the duration of a single transaction.
* Examples of potential transaction specific context include: a user id, user agent, IP.
* Transaction context is merged with evaluation context prior to flag evaluation.
*
* <p>
* The precedence of merging context can be seen in
* <a href=https://openfeature.dev/specification/sections/evaluation-context#requirement-323>the specification</a>.
Expand Down
Loading