Skip to content

Commit

Permalink
Initialize CommonStatsFlags with empty array for levels
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 8b837aa commit 79331c4
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public class CommonStatsFlags implements Writeable, Cloneable {
private boolean includeOnlyTopIndexingPressureMetrics = false;
// Used for metric CACHE_STATS, to determine which caches to report stats for
private EnumSet<CacheType> includeCaches = EnumSet.noneOf(CacheType.class);
private String[] levels;
private String[] levels = new String[0];

/**
* @param flags flags to set. If no flags are supplied, default flags will be set.
Expand Down Expand Up @@ -139,7 +139,7 @@ public CommonStatsFlags all() {
includeAllShardIndexingPressureTrackers = false;
includeOnlyTopIndexingPressureMetrics = false;
includeCaches = EnumSet.noneOf(CacheType.class);
levels = null;
levels = new String[0];
return this;
}

Expand All @@ -156,7 +156,7 @@ public CommonStatsFlags clear() {
includeAllShardIndexingPressureTrackers = false;
includeOnlyTopIndexingPressureMetrics = false;
includeCaches = EnumSet.noneOf(CacheType.class);
levels = null;
levels = new String[0];
return this;
}

Expand Down

0 comments on commit 79331c4

Please sign in to comment.