Skip to content

Commit

Permalink
Correctly size ArrayList in Rollups
Browse files Browse the repository at this point in the history
  • Loading branch information
kilink committed Sep 23, 2024
1 parent a4e2f17 commit 4f6ac13
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ static RollupPolicy fromRules(Map<String, String> commonTags, List<RollupPolicy.
}

// Convert to final result type
List<RollupPolicy.Result> results = new ArrayList<>();
List<RollupPolicy.Result> results = new ArrayList<>(aggregates.size());
for (Map.Entry<Map<String, String>, Map<Id, Aggregator>> entry : aggregates.entrySet()) {
results.add(new RollupPolicy.Result(entry.getKey(), toMeasurements(entry.getValue())));
}
Expand Down

0 comments on commit 4f6ac13

Please sign in to comment.