Implementation of XMLStreamReader.getLocation() inconsistent with javadoc #156
Labels
good first issue
Issue that seems easy to resolve and is likely a good candidate for contributors new to project
pr-welcome
Issue for which progress most likely if someone submits a Pull Request
Hello,
I'm contributing to the Apache Camel project where we use woodstox as the preferred Stax implementation. In particular we rely on XMLStreamReader.getLocation().getCharacterOffset() and the fact that it returns the position at the start of the event, for example at the beginning of the start or end tag.
The built-in implementation of XMLStreamReader in the JDK returns the offset at the end of the tag. The javadoc for the JDK API doesn't seem explicit. But I notice that the javadoc for the Woodstox implementation class (com.ctc.wstx.sr.BasicStreamReader) states:
But the implementation of BasicStreamReader returns the start location.
I'm not suggesting you change the implementation, since Camel is currently relying on it, but the javadoc should be corrected in that case.
-Karen Lease
The text was updated successfully, but these errors were encountered: