diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-12-04 23:02:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-04 23:02:42 +0100 |
commit | 5381962e747ea9ac515abcf51dc70ad40bbbf70d (patch) | |
tree | d25af24e6a007091bb4a321a63747f1c7b439045 /model-integration/src/main | |
parent | 2555b49b4390ed9dac9eab3959d6cc6e3511515c (diff) |
Revert "Revert collect(Collectors.toList())"
Diffstat (limited to 'model-integration/src/main')
4 files changed, 4 insertions, 4 deletions
diff --git a/model-integration/src/main/java/ai/vespa/rankingexpression/importer/DimensionRenamer.java b/model-integration/src/main/java/ai/vespa/rankingexpression/importer/DimensionRenamer.java index a1bc0eb0492..19124e8920d 100644 --- a/model-integration/src/main/java/ai/vespa/rankingexpression/importer/DimensionRenamer.java +++ b/model-integration/src/main/java/ai/vespa/rankingexpression/importer/DimensionRenamer.java @@ -122,7 +122,7 @@ public class DimensionRenamer { constraintsPerOperation.entrySet().stream() .sorted(Comparator.comparingInt(entry -> - entry.getValue())) .map(Map.Entry::getKey) - .collect(Collectors.toList()); + .toList(); List<RenameTarget> targets = new ArrayList<>(); for (IntermediateOperation operation : prioritizedOperations) { diff --git a/model-integration/src/main/java/ai/vespa/rankingexpression/importer/OrderedTensorType.java b/model-integration/src/main/java/ai/vespa/rankingexpression/importer/OrderedTensorType.java index b77960ff3fb..ceb9a27924d 100644 --- a/model-integration/src/main/java/ai/vespa/rankingexpression/importer/OrderedTensorType.java +++ b/model-integration/src/main/java/ai/vespa/rankingexpression/importer/OrderedTensorType.java @@ -58,7 +58,7 @@ public class OrderedTensorType { } public List<String> dimensionNames() { - return dimensions.stream().map(TensorType.Dimension::name).collect(Collectors.toList()); + return dimensions.stream().map(TensorType.Dimension::name).toList(); } private int[] createDimensionMap() { diff --git a/model-integration/src/main/java/ai/vespa/rankingexpression/importer/onnx/GraphImporter.java b/model-integration/src/main/java/ai/vespa/rankingexpression/importer/onnx/GraphImporter.java index ec8c97bdf64..e959dfe479d 100644 --- a/model-integration/src/main/java/ai/vespa/rankingexpression/importer/onnx/GraphImporter.java +++ b/model-integration/src/main/java/ai/vespa/rankingexpression/importer/onnx/GraphImporter.java @@ -261,7 +261,7 @@ class GraphImporter { IntermediateGraph intermediateGraph) { return node.getInputList().stream() .map(nodeName -> importOperation(nodeName, onnxGraph, intermediateGraph)) - .collect(Collectors.toList()); + .toList(); } private static void verifyNoWarnings(IntermediateGraph intermediateGraph) { diff --git a/model-integration/src/main/java/ai/vespa/rankingexpression/importer/operations/IntermediateOperation.java b/model-integration/src/main/java/ai/vespa/rankingexpression/importer/operations/IntermediateOperation.java index e49ab274b5a..d33a2e3eeda 100644 --- a/model-integration/src/main/java/ai/vespa/rankingexpression/importer/operations/IntermediateOperation.java +++ b/model-integration/src/main/java/ai/vespa/rankingexpression/importer/operations/IntermediateOperation.java @@ -330,7 +330,7 @@ public abstract class IntermediateOperation { TensorType.Value resultValueType() { return TensorType.Value.largestOf(inputs.stream() .map(input -> input.type().get().type().valueType()) - .collect(Collectors.toList())); + .toList()); } public abstract IntermediateOperation withInputs(List<IntermediateOperation> inputs); |