open-feature/java-sdk

[bug?] initialize should accept global context

Closed this issue · 2 comments

As mentioned here by @s-sen , I think we should add a EvaluationContext param here.

I also believe we may want to declare a throws Exception to this method - we already wrap this method in a try/catch when it's called in the SDK, and it's quite realistic to see some initial handshake/etc failing in the init().

This hasn't been released yet, so there's no concern about this being a "breaking" change.

cc @Kavindu-Dodan @justinabrahms @s-sen @lopitz

Correct, this comes from the requirement Requirement 2.4.1

The provider MAY define an initialize function which accepts the global evaluation context as an argument and performs initialization logic relevant to the provider.

This should be able to fix easily.

I've fixed this in #476