Mercurial > hg > openjdk > jdk9 > jaxp
changeset 1070:48fa77af1532 jdk-9+155
8173260: CatalogManager.catalogResolver should not fail when non-existing URI is passed to it
Summary: removed the code that special cased file and jar and threw IAE if the file did not exist.
Reviewed-by: alanb, lancea
author | dfuchs |
---|---|
date | Fri, 27 Jan 2017 20:33:34 +0000 |
parents | b7bd7cac2790 |
children | 7d5ef01b8123 |
files | src/java.xml/share/classes/javax/xml/catalog/Util.java test/javax/xml/jaxp/unittest/catalog/CatalogFileInputTest.java |
diffstat | 2 files changed, 2 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/java.xml/share/classes/javax/xml/catalog/Util.java Thu Jan 26 21:20:30 2017 +0000 +++ b/src/java.xml/share/classes/javax/xml/catalog/Util.java Fri Jan 27 20:33:34 2017 +0000 @@ -149,14 +149,6 @@ CatalogMessages.reportIAE(CatalogMessages.ERR_URI_NOTVALIDURL, new Object[]{uri}, null); } - - // verify the resource exists where possible - if (isFileUri(uri)) { - if (!isFileUriExist(uri, false)) { - CatalogMessages.reportIAE(CatalogMessages.ERR_URI_NOTVALIDURL, - new Object[]{uri}, null); - } - } } /**
--- a/test/javax/xml/jaxp/unittest/catalog/CatalogFileInputTest.java Thu Jan 26 21:20:30 2017 +0000 +++ b/test/javax/xml/jaxp/unittest/catalog/CatalogFileInputTest.java Fri Jan 27 20:33:34 2017 +0000 @@ -222,6 +222,8 @@ String catalogUri = getClass().getResource("catalog_invalid.xml").toExternalForm(); return new Object[][]{ {catalogUri, "-//W3C//DTD XHTML 1.0 Strict//EN", + "The catalog is invalid, attempting to match the public entry shall return null."}, + {"file:/../../..", "-//W3C//DTD XHTML 1.0 Strict//EN", "The catalog is invalid, attempting to match the public entry shall return null."} }; } @@ -239,7 +241,6 @@ return new Object[][]{ {""}, {"file:a/b\\c"}, - {"file:/../../.."}, {"c:/te:t"}, {"c:/te?t"}, {"c/te*t"},