You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Tomislav Mrkus (JIRA)" <ji...@apache.org> on 2011/09/21 14:07:09 UTC

[jira] [Created] (CAMEL-4472) HazelcastComponentHelper. copyHeaders() creates an Out message

HazelcastComponentHelper. copyHeaders() creates an Out message
--------------------------------------------------------------

                 Key: CAMEL-4472
                 URL: https://issues.apache.org/jira/browse/CAMEL-4472
             Project: Camel
          Issue Type: Bug
          Components: camel-hazelcast
            Reporter: Tomislav Mrkus


Due to lazy creation of Out message in DefaultExchange.getOut() implementation, HazelcastComponentHelper.copyHeaders() method inadvertently creates an Out message if one has not been set yet, which then creates problems in CamelInvocationHandler.getBody() which then returns null as a result. 

There should be a check in copyHeaders() to see if Out exists, e.g.: 

{code}
// set out headers 
if (ex.hasOut()) { 
    ex.getOut().setHeaders(headers); 
} 
{code}

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

        

[jira] [Updated] (CAMEL-4472) HazelcastComponentHelper. copyHeaders() creates an Out message

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

Tomislav Mrkus updated CAMEL-4472:
----------------------------------

    Attachment: CAMEL-4472.patch

> HazelcastComponentHelper. copyHeaders() creates an Out message
> --------------------------------------------------------------
>
>                 Key: CAMEL-4472
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4472
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-hazelcast
>            Reporter: Tomislav Mrkus
>         Attachments: CAMEL-4472.patch
>
>
> Due to lazy creation of Out message in DefaultExchange.getOut() implementation, HazelcastComponentHelper.copyHeaders() method inadvertently creates an Out message if one has not been set yet, which then creates problems in CamelInvocationHandler.getBody() which then returns null as a result. 
> There should be a check in copyHeaders() to see if Out exists, e.g.: 
> {code}
> // set out headers 
> if (ex.hasOut()) { 
>     ex.getOut().setHeaders(headers); 
> } 
> {code}

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

        

[jira] [Resolved] (CAMEL-4472) HazelcastComponentHelper. copyHeaders() creates an Out message

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

Claus Ibsen resolved CAMEL-4472.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.9.0
                   2.8.2
         Assignee: Claus Ibsen

> HazelcastComponentHelper. copyHeaders() creates an Out message
> --------------------------------------------------------------
>
>                 Key: CAMEL-4472
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4472
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-hazelcast
>            Reporter: Tomislav Mrkus
>            Assignee: Claus Ibsen
>             Fix For: 2.8.2, 2.9.0
>
>         Attachments: CAMEL-4472.patch
>
>
> Due to lazy creation of Out message in DefaultExchange.getOut() implementation, HazelcastComponentHelper.copyHeaders() method inadvertently creates an Out message if one has not been set yet, which then creates problems in CamelInvocationHandler.getBody() which then returns null as a result. 
> There should be a check in copyHeaders() to see if Out exists, e.g.: 
> {code}
> // set out headers 
> if (ex.hasOut()) { 
>     ex.getOut().setHeaders(headers); 
> } 
> {code}

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

        

[jira] [Commented] (CAMEL-4472) HazelcastComponentHelper. copyHeaders() creates an Out message

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

Claus Ibsen commented on CAMEL-4472:
------------------------------------

The copyHeaders is only used by the producers as a mean to preserve headers after sending a message to hazelcast. So we should be okay with this patch.

> HazelcastComponentHelper. copyHeaders() creates an Out message
> --------------------------------------------------------------
>
>                 Key: CAMEL-4472
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4472
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-hazelcast
>            Reporter: Tomislav Mrkus
>         Attachments: CAMEL-4472.patch
>
>
> Due to lazy creation of Out message in DefaultExchange.getOut() implementation, HazelcastComponentHelper.copyHeaders() method inadvertently creates an Out message if one has not been set yet, which then creates problems in CamelInvocationHandler.getBody() which then returns null as a result. 
> There should be a check in copyHeaders() to see if Out exists, e.g.: 
> {code}
> // set out headers 
> if (ex.hasOut()) { 
>     ex.getOut().setHeaders(headers); 
> } 
> {code}

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