docs: add provider lifecycle guidance#1387
Conversation
Signed-off-by: zhouzhou626 <zhouzhou626@users.noreply.github.com>
✅ Deploy Preview for openfeature ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Code Review
This pull request updates the documentation for the Evaluation API and Provider concepts, including a correction to Java package imports and the addition of sections regarding provider initialization and API shutdown. Feedback was provided to ensure the Java code example for the provider lifecycle matches the SDK's interface signature by adding a 'throws Exception' clause to the shutdown method.
| } | ||
|
|
||
| @Override | ||
| public void shutdown() { |
There was a problem hiding this comment.
In the OpenFeature Java SDK, the shutdown method in the FeatureProvider interface is defined with a throws Exception clause. While it is technically valid in Java to override a method and omit the throws clause if the implementation doesn't throw checked exceptions, it is better for documentation examples to match the interface signature for consistency with the initialize method shown above.
@Override
public void shutdown() throws Exception {
Summary
Closes #119.
Testing
Additional checks attempted: