Closed lsergio closed 3 weeks ago
In my scenario, I'm trying to check if these toggles are on or off, regardless of the feature value:
So for now I inspected the features json manually instead of using the sdk.
Hi, we have fixed this issue. Here is a pull request for it (https://github.com/growthbook/growthbook-sdk-java/pull/65).
Per the sdk documentation:
isOn() should tell me whether is feature is enabled. But instead it inspects the value of the feature and returns true if the value is a positive number, a non-empty string or true.
So, if I have a feature that is enabled on any environment, but the default value is 0 per my business rules, the sdk will return false for isOn. If this is intentional, we might change the docs, and maybe add a isEnabled(featureName) method.