mirror of
https://github.com/stleary/JSON-java.git
synced 2025-08-03 03:15:32 -04:00
fix CI build error
This commit is contained in:
parent
78528102d0
commit
98cd8ef8b2
@ -934,16 +934,24 @@ public class XMLTest {
|
|||||||
@Test
|
@Test
|
||||||
public void testIssue537CaseSensitiveHexEscapeFullFile(){
|
public void testIssue537CaseSensitiveHexEscapeFullFile(){
|
||||||
try {
|
try {
|
||||||
try(
|
InputStream xmlStream = null;
|
||||||
InputStream xmlStream = XMLTest.class.getClassLoader().getResourceAsStream("Issue537.xml");
|
try {
|
||||||
Reader xmlReader = new InputStreamReader(xmlStream);
|
xmlStream = XMLTest.class.getClassLoader().getResourceAsStream("Issue537.xml");
|
||||||
){
|
Reader xmlReader = new InputStreamReader(xmlStream);
|
||||||
JSONObject actual = XML.toJSONObject(xmlReader, true);
|
JSONObject actual = XML.toJSONObject(xmlReader, true);
|
||||||
try(
|
InputStream jsonStream = null;
|
||||||
InputStream jsonStream = XMLTest.class.getClassLoader().getResourceAsStream("Issue537.json");
|
try {
|
||||||
){
|
jsonStream = XMLTest.class.getClassLoader().getResourceAsStream("Issue537.json");
|
||||||
final JSONObject expected = new JSONObject(new JSONTokener(jsonStream));
|
final JSONObject expected = new JSONObject(new JSONTokener(jsonStream));
|
||||||
Util.compareActualVsExpectedJsonObjects(actual,expected);
|
Util.compareActualVsExpectedJsonObjects(actual,expected);
|
||||||
|
} finally {
|
||||||
|
if (jsonStream != null) {
|
||||||
|
jsonStream.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
if (xmlStream != null) {
|
||||||
|
xmlStream.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user