8226193: BundleNameTest and BundleIdentifierTest fails if run without network connection
Submitted-by: almatvee
Reviewed-by: herrick, asemenyuk
--- a/test/jdk/tools/jpackage/createappimage/macosx/JPackageCreateAppImageBundleIdentifierTest.java Fri Jun 14 12:04:12 2019 -0400
+++ b/test/jdk/tools/jpackage/createappimage/macosx/JPackageCreateAppImageBundleIdentifierTest.java Fri Jun 14 20:56:48 2019 -0400
@@ -107,8 +107,9 @@
File infoPList = new File(OUTPUT + File.separator + APP_NAME + ".app" +
File.separator + "Contents" + File.separator + "Info.plist");
- DocumentBuilder b = DocumentBuilderFactory.newDefaultInstance()
- .newDocumentBuilder();
+ DocumentBuilderFactory dbf = DocumentBuilderFactory.newDefaultInstance();
+ dbf.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
+ DocumentBuilder b = dbf.newDocumentBuilder();
org.w3c.dom.Document doc = b.parse(new FileInputStream(
infoPList.getAbsolutePath()));
--- a/test/jdk/tools/jpackage/createappimage/macosx/JPackageCreateAppImageBundleNameTest.java Fri Jun 14 12:04:12 2019 -0400
+++ b/test/jdk/tools/jpackage/createappimage/macosx/JPackageCreateAppImageBundleNameTest.java Fri Jun 14 20:56:48 2019 -0400
@@ -105,8 +105,9 @@
File infoPList = new File(OUTPUT + File.separator + APP_NAME + ".app" +
File.separator + "Contents" + File.separator + "Info.plist");
- DocumentBuilder b = DocumentBuilderFactory.newDefaultInstance()
- .newDocumentBuilder();
+ DocumentBuilderFactory dbf = DocumentBuilderFactory.newDefaultInstance();
+ dbf.setFeature("http://apache.org/xml/features/nonvalidating/load-external-dtd", false);
+ DocumentBuilder b = dbf.newDocumentBuilder();
org.w3c.dom.Document doc = b.parse(new FileInputStream(
infoPList.getAbsolutePath()));