Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public class CollectorResult implements ToXContentObject, Writeable {
/**
* A list of children collectors "embedded" inside this collector
*/
private List<CollectorResult> children;
private final List<CollectorResult> children;

public CollectorResult(String collectorName, String reason, long time, List<CollectorResult> children) {
this.collectorName = collectorName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ public class InternalProfileCollector implements Collector {
*/
private final InternalProfileCollector[] children;

public InternalProfileCollector(Collector collector, String reason, InternalProfileCollector... children) {
public InternalProfileCollector(Collector collector, String reason, Collector... children) {
this.collector = new ProfileCollector(collector);
this.reason = reason;
this.collectorName = deriveCollectorName(collector);
Objects.requireNonNull(children, "children collectors cannot be null");
for (InternalProfileCollector child : children) {
Objects.requireNonNull(child, "child collector cannot be null");
this.children = new InternalProfileCollector[children.length];
for (int i = 0; i < children.length; i++) {
this.children[i] = (InternalProfileCollector) Objects.requireNonNull(children[i], "child collector cannot be null");
}
this.children = children;
}

/**
Expand Down

This file was deleted.

Loading