diff --git a/pom.xml b/pom.xml index 6f6e14f6a..ef2745c43 100644 --- a/pom.xml +++ b/pom.xml @@ -67,7 +67,7 @@ org.mockito mockito-core - 4.11.0 + 5.14.2 test @@ -419,7 +419,7 @@ com.puppycrawl.tools checkstyle - 8.45.1 + 10.21.0 diff --git a/src/main/java/dev/openfeature/sdk/FeatureProvider.java b/src/main/java/dev/openfeature/sdk/FeatureProvider.java index 706818e85..4c7aff2a8 100644 --- a/src/main/java/dev/openfeature/sdk/FeatureProvider.java +++ b/src/main/java/dev/openfeature/sdk/FeatureProvider.java @@ -27,13 +27,12 @@ default List 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. + * *

* 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. *

*/ default void initialize(EvaluationContext evaluationContext) throws Exception { @@ -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. + * *

* 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. *

*/ default void shutdown() { @@ -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}. - * - *

Providers which do not implement this method are assumed to be ready immediately.

+ * + *

+ * Providers which do not implement this method are assumed to be ready immediately. + *

* * @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; diff --git a/src/main/java/dev/openfeature/sdk/TransactionContextPropagator.java b/src/main/java/dev/openfeature/sdk/TransactionContextPropagator.java index 05f7d3eb8..adc69dc97 100644 --- a/src/main/java/dev/openfeature/sdk/TransactionContextPropagator.java +++ b/src/main/java/dev/openfeature/sdk/TransactionContextPropagator.java @@ -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. + * *

* The precedence of merging context can be seen in * the specification.