You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by "Rich Scheuerle (JIRA)" <ji...@apache.org> on 2007/07/16 19:30:05 UTC

[jira] Created: (WSCOMMONS-219) IllegalStateException in StAXBuilder constructor

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: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org


[jira] Resolved: (WSCOMMONS-219) IllegalStateException in StAXBuilder constructor

Posted by "Rich Scheuerle (JIRA)" <ji...@apache.org>.
     [ 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: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org