Skip to content

Commit

Permalink
Addressed comment
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Alfonsi <[email protected]>
  • Loading branch information
Peter Alfonsi committed Apr 23, 2024
1 parent c1d7bf9 commit 2abb89d
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
*/
public class NoopCacheStatsHolder implements CacheStatsHolder {
private static final NoopCacheStatsHolder singletonInstance = new NoopCacheStatsHolder();
private static final ImmutableCacheStatsHolder immutableCacheStatsHolder;
static {
ImmutableCacheStatsHolder.Node dummyNode = new ImmutableCacheStatsHolder.Node("", null, new ImmutableCacheStats(0, 0, 0, 0, 0));
immutableCacheStatsHolder = new ImmutableCacheStatsHolder(dummyNode, List.of());
}

private NoopCacheStatsHolder() {}

Expand Down Expand Up @@ -58,7 +63,6 @@ public void removeDimensions(List<String> dimensionValues) {}

@Override
public ImmutableCacheStatsHolder getImmutableCacheStatsHolder() {
ImmutableCacheStatsHolder.Node dummyNode = new ImmutableCacheStatsHolder.Node("", null, new ImmutableCacheStats(0, 0, 0, 0, 0));
return new ImmutableCacheStatsHolder(dummyNode, List.of());
return immutableCacheStatsHolder;
}
}

0 comments on commit 2abb89d

Please sign in to comment.