From 15b5b722555d57b34a43800c9c4bd0d15cf5fd6e Mon Sep 17 00:00:00 2001 From: Piotr Findeisen Date: Tue, 17 Jan 2023 22:06:58 +0100 Subject: [PATCH] Document ForwardingExecutorService behavior for default methods Currently, Guava is built with Java 9 and `ExecutorService` has no default methods. This changes in Java 19, where `ExecutorService.close` is added. Ensure users have right expectations about future evolution of the `ForwardingExecutorService` and its compatibility with newer Java versions. --- .../common/util/concurrent/ForwardingExecutorService.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/guava/src/com/google/common/util/concurrent/ForwardingExecutorService.java b/guava/src/com/google/common/util/concurrent/ForwardingExecutorService.java index 9a87b5c981ad..e9a1c4ec0a4f 100644 --- a/guava/src/com/google/common/util/concurrent/ForwardingExecutorService.java +++ b/guava/src/com/google/common/util/concurrent/ForwardingExecutorService.java @@ -33,6 +33,10 @@ * should override one or more methods to modify the behavior of the backing executor service as * desired per the decorator pattern. * + *

{@code default} method warning: This class does not forward calls to {@code + * default} methods. Instead, it inherits their default implementations. When those implementations + * invoke methods, they invoke methods on the {@code ForwardingExecutorService}. + * * @author Kurt Alfred Kluever * @since 10.0 */