JDK-8162431 : CatalogUriResolver with circular/self referencing catalog file is not throwing CatalogException as expected
Type:Bug
Component:xml
Sub-Component:jaxp
Affected Version:9
Priority:P2
Status:Closed
Resolution:Fixed
Submitted:2016-07-22
Updated:2016-09-23
Resolved:2016-08-31
The Version table provides details related to the release that this issue/RFE will be addressed.
Unresolved : Release in which this issue/RFE will be addressed. Resolved: Release in which this issue/RFE has been resolved. Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.
CatalogUriResolver's resolve() method, with circular/self referencing catalog file is not throwing CatalogException as expected. The same scenario works fine with CatalogResolver resolveEntity().
Comments
RULE "api/javax_xml/catalog/CatalogUriResolver/index_ResolveTests" Exception java.lang.NoSuchMethodError: javax.xml.catalog.CatalogManager.catalogUriResolver(Ljavax/xml/catalog/CatalogFeatures;[Ljava/lang/String;)Ljavax/xml/catalog/CatalogUriResolver;
RULE "api/javax_xml/catalog/CatalogUriResolver/index_ResolveTests" TestCase [absoluteHref] Testcase "absoluteHref" has thrown an unexpected exception java.lang.NoSuchMethodError: javax.xml.catalog.CatalogManager.catalogUriResolver(Ljavax/xml/catalog/CatalogFeatures;[Ljava/lang/String;)Ljavax/xml/catalog/CatalogUriResolver;
RULE "api/javax_xml/catalog/CatalogUriResolver/index_ResolveTests" TestCase [noMatchResolveContinueAbs] Testcase "noMatchResolveContinueAbs" has thrown an unexpected exception java.lang.NoSuchMethodError: javax.xml.catalog.CatalogManager.catalogUriResolver(Ljavax/xml/catalog/CatalogFeatures;[Ljava/lang/String;)Ljavax/xml/catalog/CatalogUriResolver;
RULE "api/javax_xml/catalog/CatalogUriResolver/index_ResolveTests" TestCase [noMatchResolveContinueRel] Testcase "noMatchResolveContinueRel" has thrown an unexpected exception java.lang.NoSuchMethodError: javax.xml.catalog.CatalogManager.catalogUriResolver(Ljavax/xml/catalog/CatalogFeatures;[Ljava/lang/String;)Ljavax/xml/catalog/CatalogUriResolver;
RULE "api/javax_xml/catalog/CatalogUriResolver/index_ResolveTests" TestCase [noMatchResolveIgnore] Testcase "noMatchResolveIgnore" has thrown an unexpected exception java.lang.NoSuchMethodError: javax.xml.catalog.CatalogManager.catalogUriResolver(Ljavax/xml/catalog/CatalogFeatures;[Ljava/lang/String;)Ljavax/xml/catalog/CatalogUriResolver;
RULE "api/javax_xml/catalog/CatalogUriResolver/index_ResolveTests" TestCase [relativeHrefWithBase] Testcase "relativeHrefWithBase" has thrown an unexpected exception java.lang.NoSuchMethodError: javax.xml.catalog.CatalogManager.catalogUriResolver(Ljavax/xml/catalog/CatalogFeatures;[Ljava/lang/String;)Ljavax/xml/catalog/CatalogUriResolver;
RULE "api/javax_xml/catalog/CatalogUriResolver/index_ResolveTests" TestCase [testCircularRef] Wrong type of exception was thrown
Matches:
RULE "api/javax_xml/catalog/CatalogUriResolver/index_ResolveTests" TestCase [testMatch2] test cases: 22; all failed
RULE "api/javax_xml/catalog/CatalogUriResolver/index_ResolveTests" TestCase [testNonWellFormedCat] Wrong type of exception was thrown
RULE "api/javax_xml/catalog/CatalogUriResolver/index_ResolveTests" TestCase [testSelfRef] Wrong type of exception was thrown
Matches:
RULE "api/javax_xml/catalog/CatalogUriResolver/index_ResolveTests" TestCase [throwsCatalogException] Wrong type of exception was thrown
09-09-2016
This issue will be resolved by JDK-8163232.
18-08-2016
Note that the test is trying to resolve with an empty string (catalogUriResolver.resolve("", "")). The resolve method should have reported a NullPointerException, which will be the case when JDK-8163232 is completed. CatalogUriResolver will be removed as well if approved.
These tests pass when href is not null or empty, e.g. catalogUriResolver.resolve("x", "").