Closed GFriedrich closed 5 months ago
Oh that's a nice catch, this probably isn't something we'll tackle immediately but we'd be more than happy to take a PR
This is an oversight on our end. Your suggestion makes sense at first sight, feel free to push a PR!
Thanks šš¼
Describe the bug
The FakeUnleash method using the fallbackAction doesn't take into account the global activation/deactivation flags. Right now the code at https://github.com/Unleash/unleash-client-java/blob/b2ac9aee6aecbd3e968ed5c0e51bb5fca1c60452/src/main/java/io/getunleash/FakeUnleash.java#L39-L45 just checks whether a certain flag is configured. But if you use the global flags, then no specific feature is set. Therefore this method always falls back to the default action instead, which is unexpected. Therefore I would suggest to change the line of https://github.com/Unleash/unleash-client-java/blob/b2ac9aee6aecbd3e968ed5c0e51bb5fca1c60452/src/main/java/io/getunleash/FakeUnleash.java#L41 to something like
Steps to reproduce the bug
enableAll
isEnabled("abc", (a, b) -> false)
false
even though all flags have been enabled.Expected behavior
FakeUnleash should correctly take into account global flags.
Logs, error output, etc.
No response
Screenshots
No response
Additional context
No response
Unleash version
9.2.0
Subscription type
None
Hosting type
None
SDK information (language and version)
No response