Project

Profile

Help

Support #5632

closed

NPE in SchemaReader

Added by Radu Coravu about 2 months ago. Updated 22 days ago.

Status:
Closed
Priority:
Low
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
2022-08-03
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

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)
Actions #1

Updated by Radu Coravu about 2 months ago

More details about the NPE: java.lang.NullPointerException: Cannot invoke "javax.xml.transform.Source.getSystemId()" because "source" is null

Actions #2

Updated by Radu Coravu about 2 months 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.

Actions #3

Updated by Michael Kay 23 days 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.

Actions #4

Updated by Radu Coravu 22 days ago

Agreed, thanks.

Please register to edit this issue

Also available in: Atom PDF