Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 66c17bf

Browse files
committedJun 22, 2015
Added close statements for parser
1 parent 6885adf commit 66c17bf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎json/streaming-parser/src/test/java/org/javaee7/json/streaming/parser/JsonParserFromStreamTest.java

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

4646
assertEquals(JsonParser.Event.START_OBJECT, parser.next());
4747
assertEquals(JsonParser.Event.END_OBJECT, parser.next());
48+
parser.close();
4849
}
4950

5051
@Test
@@ -60,6 +61,7 @@ public void testSimpleObject() throws JSONException {
6061
assertEquals(JsonParser.Event.KEY_NAME, parser.next());
6162
assertEquals(JsonParser.Event.VALUE_STRING, parser.next());
6263
assertEquals(JsonParser.Event.END_OBJECT, parser.next());
64+
parser.close();
6365
}
6466

6567
@Test
@@ -79,6 +81,7 @@ public void testArray() throws JSONException {
7981
assertEquals(JsonParser.Event.VALUE_STRING, parser.next());
8082
assertEquals(JsonParser.Event.END_OBJECT, parser.next());
8183
assertEquals(JsonParser.Event.END_ARRAY, parser.next());
84+
parser.close();
8285
}
8386

8487
@Test
@@ -100,6 +103,7 @@ public void testNestedStructure() throws JSONException {
100103
assertEquals(JsonParser.Event.VALUE_STRING, parser.next());
101104
assertEquals(JsonParser.Event.END_ARRAY, parser.next());
102105
assertEquals(JsonParser.Event.END_OBJECT, parser.next());
106+
parser.close();
103107
}
104108

105109
}

0 commit comments

Comments
 (0)
Please sign in to comment.