Skip to content
Prev Previous commit
Next Next commit
Added close statements for parser
  • Loading branch information
rbrinkster committed Jun 22, 2015
commit 6885adf3d71144b9e62946e10a3720ea63dbe964
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public void testEmptyObject() throws JSONException {
JsonParser parser = Json.createParser(new StringReader(json));
assertEquals(JsonParser.Event.START_OBJECT, parser.next());
assertEquals(JsonParser.Event.END_OBJECT, parser.next());
parser.close();
}

@Test
Expand All @@ -52,6 +53,7 @@ public void testSimpleObject() throws JSONException {
assertEquals(JsonParser.Event.KEY_NAME, parser.next());
assertEquals(JsonParser.Event.VALUE_STRING, parser.next());
assertEquals(JsonParser.Event.END_OBJECT, parser.next());
parser.close();
}

@Test
Expand All @@ -68,6 +70,7 @@ public void testArray() throws JSONException {
assertEquals(JsonParser.Event.VALUE_STRING, parser.next());
assertEquals(JsonParser.Event.END_OBJECT, parser.next());
assertEquals(JsonParser.Event.END_ARRAY, parser.next());
parser.close();
}

@Test
Expand All @@ -86,5 +89,6 @@ public void testNestedStructure() throws JSONException {
assertEquals(JsonParser.Event.VALUE_STRING, parser.next());
assertEquals(JsonParser.Event.END_ARRAY, parser.next());
assertEquals(JsonParser.Event.END_OBJECT, parser.next());
parser.close();
}
}