File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/test/java/com/fasterxml/jackson/databind/seq Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,6 @@ private void _testRootBeans(Source srcType) throws Exception
86
86
87
87
MappingIterator <Bean > it = _iterator (MAPPER .readerFor (Bean .class ),
88
88
JSON , srcType );
89
- MAPPER .readerFor (Bean .class ).readValues (JSON );
90
89
assertNotNull (it .getCurrentLocation ());
91
90
assertTrue (it .hasNext ());
92
91
Bean b = it .next ();
@@ -98,16 +97,17 @@ private void _testRootBeans(Source srcType) throws Exception
98
97
it .close ();
99
98
100
99
// Also, test 'readAll()'
101
- it = MAPPER .readerFor (Bean .class ). readValues ( JSON );
100
+ it = _iterator ( MAPPER .readerFor (Bean .class ), JSON , srcType );
102
101
List <Bean > all = it .readAll ();
103
102
assertEquals (2 , all .size ());
104
103
it .close ();
105
104
106
- it = MAPPER .readerFor (Bean .class ). readValues ( "{\" a\" :3}{\" a\" :3}" );
105
+ it = _iterator ( MAPPER .readerFor (Bean .class ), "{\" a\" :3}{\" a\" :3}" , srcType );
107
106
Set <Bean > set = it .readAll (new HashSet <Bean >());
108
107
assertEquals (HashSet .class , set .getClass ());
109
108
assertEquals (1 , set .size ());
110
109
assertEquals (3 , set .iterator ().next ().a );
110
+ it .close ();
111
111
}
112
112
113
113
public void testRootBeansInArray () throws Exception
You can’t perform that action at this time.
0 commit comments