Skip to content

Commit

Permalink
Fix flaky test
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Alfonsi <petealft@amazon.com>
  • Loading branch information
Peter Alfonsi committed Apr 30, 2024
1 parent 2a37bdd commit 8b837aa
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
Expand Down Expand Up @@ -170,7 +171,8 @@ private boolean internalIncrementHelper(
*/
@Override
public ImmutableCacheStatsHolder getImmutableCacheStatsHolder(String[] levels) {
return new ImmutableCacheStatsHolder(this.statsRoot, levels, dimensionNames, storeName);
String[] nonNullLevels = Objects.requireNonNullElseGet(levels, () -> new String[0]);
return new ImmutableCacheStatsHolder(this.statsRoot, nonNullLevels, dimensionNames, storeName);
}

@Override
Expand Down

0 comments on commit 8b837aa

Please sign in to comment.