[
https://issues.apache.org/jira/browse/WSCOMMONS-219?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Rich Scheuerle resolved WSCOMMONS-219.
--------------------------------------
Resolution: Fixed
Rev 556692
> IllegalStateException in StAXBuilder constructor
> ------------------------------------------------
>
> Key: WSCOMMONS-219
> URL: https://issues.apache.org/jira/browse/WSCOMMONS-219
> Project: WS-Commons
> Issue Type: Bug
> Components: AXIOM
> Reporter: Rich Scheuerle
> Assignee: Rich Scheuerle
>
> The StAXBuilder constructor invokes the getCharacterEncodingScheme() and
> getEncoding() on the underlying parser.
> There are two problems with this approach:
> 1) The parser may not be at the START_DOCUMENT state. (Example: the
> OMSourcedElement advances the parser to check namespace/localname
> information).
> 2) According to the JSR-173 specification, the parser is supposed to throw
> an IllegalStateException if the getCharacterEncoding()/getEncoding() methods
> are invoked at a non-START_DOCUMENT state. The woodstox parser is lax in its
> checking, but other installed parsers correctly throw an
> IllegalStateException.
> Solution:
> Some minor constructor additions to StAXOMBuilder and StAXBuilder to pass in
> the characterEncoding when the parser is not at the START_DOCUMENT state.
> The existing constructors remain unchanged.
> Testing a possible fix. I hope to commit a solution today.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]