-
-
Notifications
You must be signed in to change notification settings - Fork 148
Closed
Labels
has-failing-testIndicates that there exists a test case (under `failing/`) to reproduce the issueIndicates that there exists a test case (under `failing/`) to reproduce the issueion
Description
When reading an ION file using a MappingIterator, the first line is omitted.
// This file has 5 lines
File testFile = resourceToFile("test.ion");
ObjectMapper objectMapper = JacksonUtils.createIonObjectMapper();
MappingIterator<Object> mappingIterator = objectMapper.readerFor(DEFAULT_TYPE_REFERENCE).readValues(new FileInputStream(testFile));
// the first line is missing
LongAdder count = new LongAdder();
mappingIterator.forEachRemaining(obj -> {
count.increment();
});
Assertions.assertEquals(5, count.sum()); // fails as count.sum() returns 4 and not 5 as the first line is missingWhen reading in a more traditional approach the object mapper correctly read all 5 lines
Reproducer project, there is a test in it:
mapping-iterator.zip
Metadata
Metadata
Assignees
Labels
has-failing-testIndicates that there exists a test case (under `failing/`) to reproduce the issueIndicates that there exists a test case (under `failing/`) to reproduce the issueion