Skip to content

Commit

Permalink
Replace List#of by Arrays#asList
Browse files Browse the repository at this point in the history
  • Loading branch information
iverase committed Nov 16, 2024
1 parent 4edd6f7 commit a4a12b6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -188,7 +189,7 @@ public void collect(int doc, long bucket) throws IOException {
}

InternalTimeSeries buildResult(InternalTimeSeries.InternalBucket[] topBuckets) {
return new InternalTimeSeries(name, List.of(topBuckets), keyed, metadata());
return new InternalTimeSeries(name, Arrays.asList(topBuckets), keyed, metadata());
}

@FunctionalInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@

import java.io.IOException;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.function.BiConsumer;
import java.util.function.Function;
Expand Down Expand Up @@ -402,7 +401,7 @@ LongTerms buildResult(long owningBucketOrd, long otherDocCount, LongTerms.Bucket
bucketCountThresholds.getShardSize(),
showTermDocCountError,
otherDocCount,
List.of(topBuckets),
Arrays.asList(topBuckets),
null
);
}
Expand Down Expand Up @@ -484,7 +483,7 @@ DoubleTerms buildResult(long owningBucketOrd, long otherDocCount, DoubleTerms.Bu
bucketCountThresholds.getShardSize(),
showTermDocCountError,
otherDocCount,
List.of(topBuckets),
Arrays.asList(topBuckets),
null
);
}
Expand Down Expand Up @@ -606,7 +605,7 @@ SignificantLongTerms buildResult(long owningBucketOrd, long otherDocCoun, Signif
subsetSizes.get(owningBucketOrd),
supersetSize,
significanceHeuristic,
List.of(topBuckets)
Arrays.asList(topBuckets)
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ InternalMultiTerms buildResult(long otherDocCount, InternalMultiTerms.Bucket[] t
bucketCountThresholds.getShardSize(),
showTermDocCountError,
otherDocCount,
List.of(topBuckets),
Arrays.asList(topBuckets),
0,
formats,
keyConverters,
Expand Down

0 comments on commit a4a12b6

Please sign in to comment.