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
|
||||
public void testIssue537CaseSensitiveHexEscapeFullFile(){
|
||||
try {
|
||||
try(
|
||||
InputStream xmlStream = XMLTest.class.getClassLoader().getResourceAsStream("Issue537.xml");
|
||||
InputStream xmlStream = null;
|
||||
try {
|
||||
xmlStream = XMLTest.class.getClassLoader().getResourceAsStream("Issue537.xml");
|
||||
Reader xmlReader = new InputStreamReader(xmlStream);
|
||||
){
|
||||
JSONObject actual = XML.toJSONObject(xmlReader, true);
|
||||
try(
|
||||
InputStream jsonStream = XMLTest.class.getClassLoader().getResourceAsStream("Issue537.json");
|
||||
){
|
||||
InputStream jsonStream = null;
|
||||
try {
|
||||
jsonStream = XMLTest.class.getClassLoader().getResourceAsStream("Issue537.json");
|
||||
final JSONObject expected = new JSONObject(new JSONTokener(jsonStream));
|
||||
Util.compareActualVsExpectedJsonObjects(actual,expected);
|
||||
} finally {
|
||||
if (jsonStream != null) {
|
||||
jsonStream.close();
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
if (xmlStream != null) {
|
||||
xmlStream.close();
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user