Skip to content

Commit

Permalink
Document ForwardingExecutorService behavior for default methods.
Browse files Browse the repository at this point in the history
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.

Fixes #6296
Fixes #6299

RELNOTES=n/a
PiperOrigin-RevId: 502868842
  • Loading branch information
findepi authored and Google Java Core Libraries committed Jan 18, 2023
1 parent 3b68684 commit 18a696a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
* should override one or more methods to modify the behavior of the backing executor service as
* desired per the <a href="http://en.wikipedia.org/wiki/Decorator_pattern">decorator pattern</a>.
*
* <p><b>{@code default} method warning:</b> This class does <i>not</i> 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
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
* executor service as desired per the <a
* href="http://en.wikipedia.org/wiki/Decorator_pattern">decorator pattern</a>.
*
* <p><b>{@code default} method warning:</b> This class does <i>not</i> forward calls to {@code
* default} methods. Instead, it inherits their default implementations. When those implementations
* invoke methods, they invoke methods on the {@code ForwardingListeningExecutorService}.
*
* @author Isaac Shum
* @since 10.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@
* should override one or more methods to modify the behavior of the backing executor service as
* desired per the <a href="http://en.wikipedia.org/wiki/Decorator_pattern">decorator pattern</a>.
*
* <p><b>{@code default} method warning:</b> This class does <i>not</i> 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
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
* executor service as desired per the <a
* href="http://en.wikipedia.org/wiki/Decorator_pattern">decorator pattern</a>.
*
* <p><b>{@code default} method warning:</b> This class does <i>not</i> forward calls to {@code
* default} methods. Instead, it inherits their default implementations. When those implementations
* invoke methods, they invoke methods on the {@code ForwardingListeningExecutorService}.
*
* @author Isaac Shum
* @since 10.0
*/
Expand Down

0 comments on commit 18a696a

Please sign in to comment.