Skip to content

Commit

Permalink
Remove redundant code
Browse files Browse the repository at this point in the history
There is no apparent advantage in calling `getIfPresent(key)` before
calling `get(key)` on a loading cache.
  • Loading branch information
findepi committed Jan 19, 2022
1 parent b45d43e commit e14d2cb
Showing 1 changed file with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -494,10 +494,6 @@ private List<String> getPinotTableNames()

private static <K, V> V getFromCache(LoadingCache<K, V> cache, K key)
{
V value = cache.getIfPresent(key);
if (value != null) {
return value;
}
try {
return cache.get(key);
}
Expand Down

0 comments on commit e14d2cb

Please sign in to comment.