Actions
Bug #3394
closedNullPointerException thrown in samples PullExamples-j - StaxBridge
Start date:
2017-08-15
Due date:
% Done:
0%
Estimated time:
Legacy ID:
Applies to branch:
9.8
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:
Description
When we run the "test-samples-PullExamples-j" sample we are getting the following exception:
=== Serialize the input to the output ===
Exception in thread "main" java.lang.NullPointerException
at net.sf.saxon.om.NoNamespaceName.hasURI(NoNamespaceName.java:88)
at net.sf.saxon.pull.StaxBridge.getNodeName(StaxBridge.java:389)
at net.sf.saxon.pull.PullPushTee.copyEvent(PullPushTee.java:96)
at net.sf.saxon.pull.PullPushTee.next(PullPushTee.java:72)
at net.sf.saxon.pull.PullConsumer.consume(PullConsumer.java:42)
at net.sf.saxon.pull.PullPushCopier.copy(PullPushCopier.java:44)
at ee.PullExamples.serialize(PullExamples.java:54)
at ee.PullExamples.main(PullExamples.java:278)
In the StaxBridge class and method getNodeName we use the XMLStreamReader to call the method getNamespaceURI(). The specification for this method states "Returns null if the event does not have a prefix". We are not handling the situation when null is returned.
Related issues
Please register to edit this issue
Actions