From 7b93d046e67436d6a2bbbd6dc9c572517c70c0e6 Mon Sep 17 00:00:00 2001 From: Chris Povirk Date: Tue, 3 Dec 2024 13:03:53 -0500 Subject: [PATCH] Leave the value type of the `CompletableFuture` in `asMap` unspecified. --- .../java/com/github/benmanes/caffeine/cache/AsyncCache.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/caffeine/src/main/java/com/github/benmanes/caffeine/cache/AsyncCache.java b/caffeine/src/main/java/com/github/benmanes/caffeine/cache/AsyncCache.java index 94406763e0..bc5fd7b4d0 100644 --- a/caffeine/src/main/java/com/github/benmanes/caffeine/cache/AsyncCache.java +++ b/caffeine/src/main/java/com/github/benmanes/caffeine/cache/AsyncCache.java @@ -198,7 +198,8 @@ CompletableFuture> getAll(Iterable keys, * * @return a thread-safe view of this cache supporting all of the optional {@link Map} operations */ - ConcurrentMap> asMap(); + @NullUnmarked + @NonNull ConcurrentMap<@NonNull K, @NonNull CompletableFuture> asMap(); /** * Returns a view of the entries stored in this cache as a synchronous {@link Cache}. A mapping is