From e309031c7f30c13414c74f56787e63d9732d87c1 Mon Sep 17 00:00:00 2001 From: expani Date: Thu, 12 Sep 2024 20:43:02 +0530 Subject: [PATCH] Trimming numbers to avoid NFE --- .../org/apache/lucene/benchmark/jmh/DocIdEncodingBenchmark.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lucene/benchmark-jmh/src/java/org/apache/lucene/benchmark/jmh/DocIdEncodingBenchmark.java b/lucene/benchmark-jmh/src/java/org/apache/lucene/benchmark/jmh/DocIdEncodingBenchmark.java index 0044b64b114..6c4612ec018 100644 --- a/lucene/benchmark-jmh/src/java/org/apache/lucene/benchmark/jmh/DocIdEncodingBenchmark.java +++ b/lucene/benchmark-jmh/src/java/org/apache/lucene/benchmark/jmh/DocIdEncodingBenchmark.java @@ -390,7 +390,7 @@ public class DocIdEncodingBenchmark { String sequence = fileReader.nextLine().trim(); if (!sequence.startsWith("#") && !sequence.isEmpty()) { DOC_ID_SEQUENCES.add( - Arrays.stream(sequence.split(",")).mapToInt(Integer::parseInt).toArray()); + Arrays.stream(sequence.split(",")).map(String::trim).mapToInt(Integer::parseInt).toArray()); } } } catch (IOException e) {