Skip to content

Commit

Permalink
Use java for examples
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Poignant <thomas.poignant@gofeatureflag.org>
  • Loading branch information
thomaspoignant committed Aug 14, 2023
1 parent c4a7778 commit 30b5a1f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions specification/sections/01-flag-evaluation.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,14 @@ Clients may be created in critical code paths, and even per-request in server-si
This function not only sets the provider, but ensures that the provider is ready (or in error) before returning or settling.

```typescript
```java
// default client
await Openfeature.setProviderAndWait(myprovider);
const client = Openfeature.getClient();
OpenFeatureAPI.getInstance().setProviderAndWait(myprovider);
Client client = OpenFeatureAPI.getInstance().getClient();

// named client
await Openfeature.setProviderAndWait('client-name', myprovider);
const client = Openfeature.getClient('client-name');
OpenFeatureAPI.getInstance().setProviderAndWait('client-name', myprovider);
Client client = OpenFeatureAPI.getInstance().getClient('client-name');
```

Though it's possible to use [events](./05-events.md) to await provider readiness, such functions can make things simpler for `application authors` and `integrators`.
Expand Down

0 comments on commit 30b5a1f

Please sign in to comment.