Skip to content

Commit f65b7e7

Browse files
committed
Added close statements for jsonReader
1 parent d20d81b commit f65b7e7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

json/object-reader/src/test/java/org/javaee7/json/object/reader/JsonReaderFromReaderTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public void testEmptyObject() throws JSONException {
4242

4343
assertNotNull(json);
4444
assertTrue(json.isEmpty());
45+
jsonReader.close();
4546
}
4647

4748
@Test
@@ -58,6 +59,7 @@ public void testSimpleObjectWithTwoElements() throws JSONException {
5859
assertEquals("red", json.getString("apple"));
5960
assertTrue(json.containsKey("banana"));
6061
assertEquals("yellow", json.getString("banana"));
62+
jsonReader.close();
6163
}
6264

6365
@Test
@@ -72,6 +74,7 @@ public void testArray() throws JSONException {
7274

7375
JSONAssert.assertEquals("{\"apple\":\"red\"}", jsonArr.get(0).toString(), JSONCompareMode.STRICT);
7476
JSONAssert.assertEquals("{\"banana\":\"yellow\"}", jsonArr.get(1).toString(), JSONCompareMode.STRICT);
77+
jsonReader.close();
7578
}
7679

7780
@Test
@@ -103,5 +106,6 @@ public void testNestedStructure() throws JSONException {
103106
+ " \"Laurence Fishburne\","
104107
+ " \"Carrie-Anne Moss\""
105108
+ " ]", jsonArr.toString(), JSONCompareMode.STRICT);
109+
jsonReader.close();
106110
}
107111
}

0 commit comments

Comments
 (0)