You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Andreas Veithen (JIRA)" <ji...@apache.org> on 2010/10/05 00:38:32 UTC

[jira] Created: (CXF-3034) StaxUtils.copy fails on pure DOM comment node

StaxUtils.copy fails on pure DOM comment node
---------------------------------------------

                 Key: CXF-3034
                 URL: https://issues.apache.org/jira/browse/CXF-3034
             Project: CXF
          Issue Type: Bug
          Components: Core
            Reporter: Andreas Veithen
            Priority: Minor


When StaxUtils.copy is used with an XMLStreamReader created from a DOM tree containing a comment node, it will fail with a NullPointerException:

java.lang.NullPointerException
    at com.ctc.wstx.sw.BufferingXmlWriter.verifyCommentContent(BufferingXmlWriter.java:1467)
    at com.ctc.wstx.sw.BufferingXmlWriter.writeComment(BufferingXmlWriter.java:591)
    at com.ctc.wstx.sw.BaseStreamWriter.writeComment(BaseStreamWriter.java:513)
    at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:477)
    at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:452)

Note that this only occurs with a pure DOM implementation, not with SAAJ. The reason is that in SAAJ, a comment node also implements org.w3c.dom.Text.

A test case can be found in attachment. The issue occurs with current trunk (r1004461).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CXF-3034) StaxUtils.copy fails on pure DOM comment node

Posted by "Andreas Veithen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3034?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andreas Veithen updated CXF-3034:
---------------------------------

    Attachment: StaxUtilsCopyTest.java

> StaxUtils.copy fails on pure DOM comment node
> ---------------------------------------------
>
>                 Key: CXF-3034
>                 URL: https://issues.apache.org/jira/browse/CXF-3034
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>            Reporter: Andreas Veithen
>            Priority: Minor
>         Attachments: StaxUtilsCopyTest.java
>
>
> When StaxUtils.copy is used with an XMLStreamReader created from a DOM tree containing a comment node, it will fail with a NullPointerException:
> java.lang.NullPointerException
>     at com.ctc.wstx.sw.BufferingXmlWriter.verifyCommentContent(BufferingXmlWriter.java:1467)
>     at com.ctc.wstx.sw.BufferingXmlWriter.writeComment(BufferingXmlWriter.java:591)
>     at com.ctc.wstx.sw.BaseStreamWriter.writeComment(BaseStreamWriter.java:513)
>     at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:477)
>     at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:452)
> Note that this only occurs with a pure DOM implementation, not with SAAJ. The reason is that in SAAJ, a comment node also implements org.w3c.dom.Text.
> A test case can be found in attachment. The issue occurs with current trunk (r1004461).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CXF-3034) StaxUtils.copy fails on pure DOM comment node

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3034?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-3034.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.2.11



Thanks for the test case!

> StaxUtils.copy fails on pure DOM comment node
> ---------------------------------------------
>
>                 Key: CXF-3034
>                 URL: https://issues.apache.org/jira/browse/CXF-3034
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>            Reporter: Andreas Veithen
>            Assignee: Daniel Kulp
>            Priority: Minor
>             Fix For: 2.2.11
>
>         Attachments: StaxUtilsCopyTest.java
>
>
> When StaxUtils.copy is used with an XMLStreamReader created from a DOM tree containing a comment node, it will fail with a NullPointerException:
> java.lang.NullPointerException
>     at com.ctc.wstx.sw.BufferingXmlWriter.verifyCommentContent(BufferingXmlWriter.java:1467)
>     at com.ctc.wstx.sw.BufferingXmlWriter.writeComment(BufferingXmlWriter.java:591)
>     at com.ctc.wstx.sw.BaseStreamWriter.writeComment(BaseStreamWriter.java:513)
>     at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:477)
>     at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:452)
> Note that this only occurs with a pure DOM implementation, not with SAAJ. The reason is that in SAAJ, a comment node also implements org.w3c.dom.Text.
> A test case can be found in attachment. The issue occurs with current trunk (r1004461).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (CXF-3034) StaxUtils.copy fails on pure DOM comment node

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-3034?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp reassigned CXF-3034:
--------------------------------

    Assignee: Daniel Kulp

> StaxUtils.copy fails on pure DOM comment node
> ---------------------------------------------
>
>                 Key: CXF-3034
>                 URL: https://issues.apache.org/jira/browse/CXF-3034
>             Project: CXF
>          Issue Type: Bug
>          Components: Core
>            Reporter: Andreas Veithen
>            Assignee: Daniel Kulp
>            Priority: Minor
>         Attachments: StaxUtilsCopyTest.java
>
>
> When StaxUtils.copy is used with an XMLStreamReader created from a DOM tree containing a comment node, it will fail with a NullPointerException:
> java.lang.NullPointerException
>     at com.ctc.wstx.sw.BufferingXmlWriter.verifyCommentContent(BufferingXmlWriter.java:1467)
>     at com.ctc.wstx.sw.BufferingXmlWriter.writeComment(BufferingXmlWriter.java:591)
>     at com.ctc.wstx.sw.BaseStreamWriter.writeComment(BaseStreamWriter.java:513)
>     at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:477)
>     at org.apache.cxf.staxutils.StaxUtils.copy(StaxUtils.java:452)
> Note that this only occurs with a pure DOM implementation, not with SAAJ. The reason is that in SAAJ, a comment node also implements org.w3c.dom.Text.
> A test case can be found in attachment. The issue occurs with current trunk (r1004461).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.