You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using saxon I had some problems with nullPointer
java.lang.NullPointerException: null
at net.sf.saxon.event.ReceivingContentHandler.getNodeName(ReceivingContentHandler.java:529) ~[Saxon-HE-11.4.jar:?]
at net.sf.saxon.event.ReceivingContentHandler.startElement(ReceivingContentHandler.java:375) ~[Saxon-HE-11.4.jar:?]
Shouldn't the null value have the same behavior as empty string?
The text was updated successfully, but these errors were encountered:
You've raised the question in a rather strange place - the place for Saxon questions is the forum at saxonica.plan.io. This GitHub repository relates to the obsolete product Saxon-CE, which was a predecessor to SaxonJS.
The Java method ReceivingContentHandler.startElement() implements the interface org.xml.sax.ContentHandler.startElement(), and there's nothing in the Javadoc for that interface that suggests any of the arguments can be null. In fact, it clearly indicates that absent values are represented as a zero-length string.
There are some complications with this interface, because it's designed as a callback for XML parsers, and the way the arguments are supplied is supposed to depend on how the XML parser is configured. But we don't necessarily know how the XML parser was configured (and the caller might not even be an XML parser), so we have to make assumptions. It's also a very performance-critical interface so we can't afford to validate everything passed across. But despite the fact that the interface spec allows lots of variations in what's passed across, none of those variations suggest that null values should be accepted.
When using saxon I had some problems with nullPointer
Shouldn't the null value have the same behavior as empty string?
The text was updated successfully, but these errors were encountered: