[
https://issues.apache.org/jira/browse/CAMEL-6558?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Marc Carter updated CAMEL-6558:
-------------------------------
Description:
I noticed the map of headers is not restored to its original state when
restoring the original message. I can't imagine this is by design...
Debugging shows the same instance of Map is being used so the "original"
message is actually being mutated during the route execution.
{code}
exchange.getIn().getHeaders() ==
exchange.getUnitOfWork().getOriginalInMessage().getHeaders();
{code}
Looking into the code of DefaultUnitOfWork it is of note that the incoming
message is a JMSMessage (specifically a TibjmsTextMessage)
was:
I noticed the map of headers is not restored to its original state when
restoring the original message. I can't imagine this is by design...
Debugging shows the same instance of Map is being used so the "original"
message is actually being mutated during the route execution.
{code}
exchange.getIn().getHeaders() ==
exchange.getUnitOfWork().getOriginalInMessage().getHeaders();
{code}
> UnitOfWork.getOriginalInMessage does not restore headers
> --------------------------------------------------------
>
> Key: CAMEL-6558
> URL: https://issues.apache.org/jira/browse/CAMEL-6558
> Project: Camel
> Issue Type: Bug
> Components: camel-core
> Affects Versions: 2.11.0
> Reporter: Marc Carter
>
> I noticed the map of headers is not restored to its original state when
> restoring the original message. I can't imagine this is by design...
> Debugging shows the same instance of Map is being used so the "original"
> message is actually being mutated during the route execution.
> {code}
> exchange.getIn().getHeaders() ==
> exchange.getUnitOfWork().getOriginalInMessage().getHeaders();
> {code}
> Looking into the code of DefaultUnitOfWork it is of note that the incoming
> message is a JMSMessage (specifically a TibjmsTextMessage)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira