You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Aki Yoshida (JIRA)" <ji...@apache.org> on 2011/04/29 17:46:03 UTC

[jira] [Created] (CAMEL-3917) CxfPayloadConverter may start failing to convert a CxfPayload to a Node

CxfPayloadConverter may start failing to convert a CxfPayload to a Node
-----------------------------------------------------------------------

                 Key: CAMEL-3917
                 URL: https://issues.apache.org/jira/browse/CAMEL-3917
             Project: Camel
          Issue Type: Bug
          Components: camel-cxf
    Affects Versions: 2.7.1
            Reporter: Aki Yoshida
             Fix For: 2.8.0


There is an issue with CxfPayloadConverter that can lead to a failure in converting the CxfPayload into something which is actually convertible. 

This problem happens when you try to convert a CxfPayload instance that has an empty body list into a Node instance. This returns null and subsequently registers this type mapping key (CxfPayload->Node) in org.apache.camel.impl.converter.BaseTypeConverterRegistry's conversion-misses table. Because of this, a subsequent conversion using a CxfPayload instance with an non empty body list will permanently fail.

I am attaching a modified CxfPayloadConversionTest that includes testCxfPayloadToNode that illustrates this problem. Currently, the last assertion of this test is failing when this issue is present.

I think we can fix this problem by returning Void.TYPE instead of a null for this case.
In this way, the conversion is regarded as a success and there will be no entry in the conversion-misses table.

So, I am also attaching the modiefied CxfPayloadConverter class that can handle this test case.



--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CAMEL-3917) CxfPayloadConverter may start failing to convert a CxfPayload to a Node

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

Aki Yoshida updated CAMEL-3917:
-------------------------------

    Attachment: camel-cxf-20110429-patch.txt

M       trunk/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/converter/CxfPayloadConverter.java
M       trunk/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/converter/CxfPayloadConverterTest.java

> CxfPayloadConverter may start failing to convert a CxfPayload to a Node
> -----------------------------------------------------------------------
>
>                 Key: CAMEL-3917
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3917
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.7.1
>            Reporter: Aki Yoshida
>             Fix For: 2.8.0
>
>         Attachments: camel-cxf-20110429-patch.txt
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> There is an issue with CxfPayloadConverter that can lead to a failure in converting the CxfPayload into something which is actually convertible. 
> This problem happens when you try to convert a CxfPayload instance that has an empty body list into a Node instance. This returns null and subsequently registers this type mapping key (CxfPayload->Node) in org.apache.camel.impl.converter.BaseTypeConverterRegistry's conversion-misses table. Because of this, a subsequent conversion using a CxfPayload instance with an non empty body list will permanently fail.
> I am attaching a modified CxfPayloadConversionTest that includes testCxfPayloadToNode that illustrates this problem. Currently, the last assertion of this test is failing when this issue is present.
> I think we can fix this problem by returning Void.TYPE instead of a null for this case.
> In this way, the conversion is regarded as a success and there will be no entry in the conversion-misses table.
> So, I am also attaching the modiefied CxfPayloadConverter class that can handle this test case.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CAMEL-3917) CxfPayloadConverter may start failing to convert a CxfPayload to a Node

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

Daniel Kulp updated CAMEL-3917:
-------------------------------

    Fix Version/s: 2.7.3

> CxfPayloadConverter may start failing to convert a CxfPayload to a Node
> -----------------------------------------------------------------------
>
>                 Key: CAMEL-3917
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3917
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.7.1
>            Reporter: Aki Yoshida
>            Assignee: Claus Ibsen
>             Fix For: 2.7.3, 2.8.0
>
>         Attachments: camel-cxf-20110429-patch.txt
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> There is an issue with CxfPayloadConverter that can lead to a failure in converting the CxfPayload into something which is actually convertible. 
> This problem happens when you try to convert a CxfPayload instance that has an empty body list into a Node instance. This returns null and subsequently registers this type mapping key (CxfPayload->Node) in org.apache.camel.impl.converter.BaseTypeConverterRegistry's conversion-misses table. Because of this, a subsequent conversion using a CxfPayload instance with an non empty body list will permanently fail.
> I am attaching a modified CxfPayloadConversionTest that includes testCxfPayloadToNode that illustrates this problem. Currently, the last assertion of this test is failing when this issue is present.
> I think we can fix this problem by returning Void.TYPE instead of a null for this case.
> In this way, the conversion is regarded as a success and there will be no entry in the conversion-misses table.
> So, I am also attaching the modiefied CxfPayloadConverter class that can handle this test case.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CAMEL-3917) CxfPayloadConverter may start failing to convert a CxfPayload to a Node

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CAMEL-3917?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13027124#comment-13027124 ] 

Claus Ibsen commented on CAMEL-3917:
------------------------------------

Thanks Aki for looking into this. Yeah those fallback converters is a bit tricky. You need to return Void.TYPE if you cannot convert it at this given time, but you may be able to do that later.

> CxfPayloadConverter may start failing to convert a CxfPayload to a Node
> -----------------------------------------------------------------------
>
>                 Key: CAMEL-3917
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3917
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.7.1
>            Reporter: Aki Yoshida
>            Assignee: Claus Ibsen
>             Fix For: 2.8.0
>
>         Attachments: camel-cxf-20110429-patch.txt
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> There is an issue with CxfPayloadConverter that can lead to a failure in converting the CxfPayload into something which is actually convertible. 
> This problem happens when you try to convert a CxfPayload instance that has an empty body list into a Node instance. This returns null and subsequently registers this type mapping key (CxfPayload->Node) in org.apache.camel.impl.converter.BaseTypeConverterRegistry's conversion-misses table. Because of this, a subsequent conversion using a CxfPayload instance with an non empty body list will permanently fail.
> I am attaching a modified CxfPayloadConversionTest that includes testCxfPayloadToNode that illustrates this problem. Currently, the last assertion of this test is failing when this issue is present.
> I think we can fix this problem by returning Void.TYPE instead of a null for this case.
> In this way, the conversion is regarded as a success and there will be no entry in the conversion-misses table.
> So, I am also attaching the modiefied CxfPayloadConverter class that can handle this test case.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Assigned] (CAMEL-3917) CxfPayloadConverter may start failing to convert a CxfPayload to a Node

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

Claus Ibsen reassigned CAMEL-3917:
----------------------------------

    Assignee: Claus Ibsen

> CxfPayloadConverter may start failing to convert a CxfPayload to a Node
> -----------------------------------------------------------------------
>
>                 Key: CAMEL-3917
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3917
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.7.1
>            Reporter: Aki Yoshida
>            Assignee: Claus Ibsen
>             Fix For: 2.8.0
>
>         Attachments: camel-cxf-20110429-patch.txt
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> There is an issue with CxfPayloadConverter that can lead to a failure in converting the CxfPayload into something which is actually convertible. 
> This problem happens when you try to convert a CxfPayload instance that has an empty body list into a Node instance. This returns null and subsequently registers this type mapping key (CxfPayload->Node) in org.apache.camel.impl.converter.BaseTypeConverterRegistry's conversion-misses table. Because of this, a subsequent conversion using a CxfPayload instance with an non empty body list will permanently fail.
> I am attaching a modified CxfPayloadConversionTest that includes testCxfPayloadToNode that illustrates this problem. Currently, the last assertion of this test is failing when this issue is present.
> I think we can fix this problem by returning Void.TYPE instead of a null for this case.
> In this way, the conversion is regarded as a success and there will be no entry in the conversion-misses table.
> So, I am also attaching the modiefied CxfPayloadConverter class that can handle this test case.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (CAMEL-3917) CxfPayloadConverter may start failing to convert a CxfPayload to a Node

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

Claus Ibsen resolved CAMEL-3917.
--------------------------------

    Resolution: Fixed

Thanks for the patch.

> CxfPayloadConverter may start failing to convert a CxfPayload to a Node
> -----------------------------------------------------------------------
>
>                 Key: CAMEL-3917
>                 URL: https://issues.apache.org/jira/browse/CAMEL-3917
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-cxf
>    Affects Versions: 2.7.1
>            Reporter: Aki Yoshida
>            Assignee: Claus Ibsen
>             Fix For: 2.8.0
>
>         Attachments: camel-cxf-20110429-patch.txt
>
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> There is an issue with CxfPayloadConverter that can lead to a failure in converting the CxfPayload into something which is actually convertible. 
> This problem happens when you try to convert a CxfPayload instance that has an empty body list into a Node instance. This returns null and subsequently registers this type mapping key (CxfPayload->Node) in org.apache.camel.impl.converter.BaseTypeConverterRegistry's conversion-misses table. Because of this, a subsequent conversion using a CxfPayload instance with an non empty body list will permanently fail.
> I am attaching a modified CxfPayloadConversionTest that includes testCxfPayloadToNode that illustrates this problem. Currently, the last assertion of this test is failing when this issue is present.
> I think we can fix this problem by returning Void.TYPE instead of a null for this case.
> In this way, the conversion is regarded as a success and there will be no entry in the conversion-misses table.
> So, I am also attaching the modiefied CxfPayloadConverter class that can handle this test case.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira