diff --git a/src/main/java/dev/openfeature/sdk/OpenFeatureClient.java b/src/main/java/dev/openfeature/sdk/OpenFeatureClient.java index 01925f431..e839bf9f9 100644 --- a/src/main/java/dev/openfeature/sdk/OpenFeatureClient.java +++ b/src/main/java/dev/openfeature/sdk/OpenFeatureClient.java @@ -34,13 +34,17 @@ public class OpenFeatureClient implements Client { private EvaluationContext evaluationContext; /** - * Create an OpenFeature client. For internal use only. + * Deprecated public constructor. Use OpenFeature.API.getClient() instead. * * @param openFeatureAPI Backing global singleton * @param name Name of the client (used by observability tools). * @param version Version of the client (used by observability tools). + * @deprecated Do not use this constructor. It's for internal use only. + * Clients created using it will not run event handlers. + * Use the OpenFeatureAPI's getClient factory method instead. */ - OpenFeatureClient(OpenFeatureAPI openFeatureAPI, String name, String version) { + @Deprecated() // TODO: eventually we will make this non-public. See issue #872 + public OpenFeatureClient(OpenFeatureAPI openFeatureAPI, String name, String version) { this.openfeatureApi = openFeatureAPI; this.name = name; this.version = version;