Skip to content

Commit

Permalink
fix the example in the documentation index page
Browse files Browse the repository at this point in the history
  • Loading branch information
Ladicek committed Dec 5, 2024
1 parent 859f836 commit 92d2548
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions doc/modules/ROOT/pages/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@ It also provides a programmatic API to build reusable guards:
[source,java]
----
public class MyService {
private static final FaultTolerance<String> guard = FaultTolerance.<String>create()
private static final TypedGuard<String> GUARD = TypedGuard.create(String.class)
.withFallback().handler(() -> "fallback").done() // <1>
.build();
public String hello() throws Exception {
return guard.call(() -> externalService.hello()); // <2>
return GUARD.call(() -> externalService.hello()); // <2>
}
}
----
Expand Down

0 comments on commit 92d2548

Please sign in to comment.