Trimming numbers to avoid NFE

This commit is contained in:
expani 2024-09-12 20:43:02 +05:30
parent 408567935b
commit e309031c7f
1 changed files with 1 additions and 1 deletions

View File

@ -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) {