Support #5632
closedNPE in SchemaReader
0%
Description
One of our auto tests throws a NPE in the Saxon EE class SchemaReader, probably because a certain import is not properly resolved through the XML catalog, maybe this situation could be handled in the Saxon code by throwing some other exception.
java.lang.NullPointerException
at com.saxonica.ee.schema.sdoc.SchemaReader.read(SchemaReader.java:142)
at com.saxonica.ee.schema.sdoc.XSDImport.prepareAttributes(XSDImport.java:212)
Updated by Radu Coravu over 2 years ago
More details about the NPE: java.lang.NullPointerException: Cannot invoke "javax.xml.transform.Source.getSystemId()" because "source" is null
Updated by Radu Coravu over 2 years ago
The NPE is caused by my mistake in implementing the API, on the "net.sf.saxon.lib.SchemaURIResolver.resolve(String, String, String[])" implementation on my side there was a case when I returned a String[] containing a null inside it.
Updated by Michael Kay over 2 years ago
- Tracker changed from Bug to Support
- Status changed from New to Closed
- Assignee set to Michael Kay
Closing this as a user error; if callback code returns an array that includes a null value, then I think throwing an NPE is reasonable.
Please register to edit this issue