Skip to content

Commit 74a3dc3

Browse files
committed
Fix up JavaDoc
1 parent 170d047 commit 74a3dc3

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

caffeine/src/main/java/com/github/benmanes/caffeine/cache/Policy.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -306,10 +306,9 @@ interface VarExpiration<K, V> {
306306

307307
/**
308308
* Associates the {@code value} with the {@code key} in this cache if the specified key is not
309-
* already associated with a value and returns null, else returns the current value. This method
310-
* differs from {@link Map#putIfAbsent} by substituting the configured {@link Expiry} with the
311-
* specified write duration, has no effect on the duration if the entry was present, and does
312-
* not return the a value.
309+
* already associated with a value. This method differs from {@link Map#putIfAbsent} by
310+
* substituting the configured {@link Expiry} with the specified write duration, has no effect
311+
* on the duration if the entry was present, and returns the success rather than a value.
313312
*
314313
* @param key the key with which the specified value is to be associated
315314
* @param value value to be associated with the specified key

caffeine/src/test/java/com/github/benmanes/caffeine/cache/ExpireAfterVarTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ public void putIfAbsent_present(Cache<Integer, Integer> cache, CacheContext cont
429429
assertThat(cache.estimatedSize(), is(0L));
430430
}
431431

432-
/* ---------------- Policy: putIfAbsent -------------- */
432+
/* ---------------- Policy: put -------------- */
433433

434434
@CheckNoWriter @CheckNoStats
435435
@Test(dataProvider = "caches", expectedExceptions = NullPointerException.class)

0 commit comments

Comments
 (0)