Skip to content

Commit eb5007b

Browse files
committed
minor test cleanup
1 parent 627a74f commit eb5007b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/test/java/com/fasterxml/jackson/databind/seq/ReadValuesTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ private void _testRootBeans(Source srcType) throws Exception
8686

8787
MappingIterator<Bean> it = _iterator(MAPPER.readerFor(Bean.class),
8888
JSON, srcType);
89-
MAPPER.readerFor(Bean.class).readValues(JSON);
9089
assertNotNull(it.getCurrentLocation());
9190
assertTrue(it.hasNext());
9291
Bean b = it.next();
@@ -98,16 +97,17 @@ private void _testRootBeans(Source srcType) throws Exception
9897
it.close();
9998

10099
// Also, test 'readAll()'
101-
it = MAPPER.readerFor(Bean.class).readValues(JSON);
100+
it = _iterator(MAPPER.readerFor(Bean.class), JSON, srcType);
102101
List<Bean> all = it.readAll();
103102
assertEquals(2, all.size());
104103
it.close();
105104

106-
it = MAPPER.readerFor(Bean.class).readValues("{\"a\":3}{\"a\":3}");
105+
it = _iterator(MAPPER.readerFor(Bean.class), "{\"a\":3}{\"a\":3}", srcType);
107106
Set<Bean> set = it.readAll(new HashSet<Bean>());
108107
assertEquals(HashSet.class, set.getClass());
109108
assertEquals(1, set.size());
110109
assertEquals(3, set.iterator().next().a);
110+
it.close();
111111
}
112112

113113
public void testRootBeansInArray() throws Exception

0 commit comments

Comments
 (0)