diff --git a/caffeine/src/main/java/com/github/benmanes/caffeine/cache/Caffeine.java b/caffeine/src/main/java/com/github/benmanes/caffeine/cache/Caffeine.java index a2a078c6e2..aca9157caa 100644 --- a/caffeine/src/main/java/com/github/benmanes/caffeine/cache/Caffeine.java +++ b/caffeine/src/main/java/com/github/benmanes/caffeine/cache/Caffeine.java @@ -380,16 +380,16 @@ Scheduler getScheduler() { * be used again. For example, the cache may evict an entry because it hasn't been used recently * or very often. *
- * When {@code size} is zero, elements will be evicted immediately after being loaded into the - * cache. This can be useful in testing, or to disable caching temporarily without a code change. - * As eviction is scheduled on the configured {@link #executor}, tests may instead prefer + * When {@code maximumSize} is zero, elements will be evicted immediately after being loaded into + * the cache. This can be useful in testing, or to disable caching temporarily without a code + * change. As eviction is scheduled on the configured {@link #executor}, tests may instead prefer * to configure the cache to execute tasks directly on the same thread. *
* This feature cannot be used in conjunction with {@link #maximumWeight}. * * @param maximumSize the maximum size of the cache * @return this {@code Caffeine} instance (for chaining) - * @throws IllegalArgumentException if {@code size} is negative + * @throws IllegalArgumentException if {@code maximumSize} is negative * @throws IllegalStateException if a maximum size or weight was already set */ @CanIgnoreReturnValue @@ -886,8 +886,8 @@ Ticker getTicker() { * {@link ClassCastException} being thrown by a cache operation at some undefined point in * the future. *
- * Warning: any exception thrown by {@code listener} will not be propagated to the - * {@code Cache} user, only logged via a {@link Logger}. + * Warning: any exception thrown by {@code evictionListener} will not be propagated + * to the {@code Cache} user, only logged via a {@link Logger}. *
* This feature cannot be used in conjunction when {@link #weakKeys()} is combined with
* {@link #buildAsync}.
@@ -941,8 +941,8 @@ public
- * Warning: any exception thrown by {@code listener} will not be propagated to the
- * {@code Cache} user, only logged via a {@link Logger}.
+ * Warning: any exception thrown by {@code removalListener} will not be propagated
+ * to the {@code Cache} user, only logged via a {@link Logger}.
*
* @param removalListener a listener instance that caches should notify each time an entry is
* removed
@@ -977,7 +977,7 @@ public