RFR (JAXP): 8144966: Catalog API: Null handling and reference to Reader
huizhe wang
huizhe.wang at oracle.com
Wed Dec 23 22:55:10 UTC 2015
Hi,
This is an improvement to the new Catalog API on null handling. At the
package level, a null argument shall result in NPE. However, an
exception was made to the methods in CatalogManager so that they can
used conveniently. With this request, we're in favor of consistency over
the minor convenience, which means a resolver can no longer be created by:
CatalogManager.catalogResolver(null);
Instead, the following may be used to achieve the same result:
CatalogManager.catalogResolver(CatalogFeatures.defaults());
While path can be empty, it can no longer be null. The following then
would also get a NPE:
CatalogManager.catalogResolver(CatalogFeatures.defaults(), null);
In consistence with ignoring invalid catalogs as required by the Catalog
standard, the statements that required CatalogException when no catalog
is found are removed.
JBS: https://bugs.openjdk.java.net/browse/JDK-8144966
webrev: http://cr.openjdk.java.net/~joehw/jdk9/8144966/webrev/
Please review.
Thanks,
Joe
More information about the core-libs-dev
mailing list