Support #5632
closed![Author: Radu Coravu](https://www.gravatar.com/avatar/765896f3e900dbcce565dbf8425cc7e7?rating=PG&size=50&default=https%3A%2F%2Fassets.plan.io%2Fimages%2Fdefault_avatar.png)
![Assignee: Michael Kay](https://www.gravatar.com/avatar/db6526d63053f09b62e52c2da8b2230a?rating=PG&size=22&default=https%3A%2F%2Fassets.plan.io%2Fimages%2Fdefault_avatar.png)
NPE 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 almost 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 almost 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 almost 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