Skip to content

Commit 74ae11a

Browse files
committed
Make throwable in CircuitBreaker be Nullable
1 parent 11363c7 commit 74ae11a

File tree

1 file changed

+3
-1
lines changed
  • spring-cloud-commons/src/main/java/org/springframework/cloud/client/circuitbreaker

1 file changed

+3
-1
lines changed

spring-cloud-commons/src/main/java/org/springframework/cloud/client/circuitbreaker/CircuitBreaker.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
import java.util.function.Function;
2020
import java.util.function.Supplier;
2121

22+
import org.jspecify.annotations.Nullable;
23+
2224
/**
2325
* Spring Cloud circuit breaker.
2426
*
@@ -32,6 +34,6 @@ default <T> T run(Supplier<T> toRun) {
3234
});
3335
}
3436

35-
<T> T run(Supplier<T> toRun, Function<Throwable, T> fallback);
37+
<T> T run(Supplier<T> toRun, Function<@Nullable Throwable, T> fallback);
3638

3739
}

0 commit comments

Comments
 (0)