@Test(expectedExceptions = NullPointerException.class, expectedExceptionsMessageRegExp = "loader returned null value") public void testDisallowsNulls() { new ThreadLocalCache<>(10, key -> null).get("foo"); }
public V get(K key) { V value = cache.get().computeIfAbsent(key, loader); return requireNonNull(value, "loader returned null value"); }
ThreadLocalCache { public V get(K key) { V value = cache.get().computeIfAbsent(key, loader); return requireNonNull(value, "loader returned null value"); } }
ThreadLocalCache { public V get(K key) { V value = cache.get().computeIfAbsent(key, loader); return requireNonNull(value, "loader returned null value"); } ThreadLocalCache(int maxSizePerThread, Function<K, V> loader); }
ThreadLocalCache { public V get(K key) { V value = cache.get().computeIfAbsent(key, loader); return requireNonNull(value, "loader returned null value"); } ThreadLocalCache(int maxSizePerThread, Function<K, V> loader); V get(K key); }
ThreadLocalCache { public V get(K key) { V value = cache.get().computeIfAbsent(key, loader); return requireNonNull(value, "loader returned null value"); } ThreadLocalCache(int maxSizePerThread, Function<K, V> loader); V get(K key);  }