[ 
https://issues.apache.org/jira/browse/CXF-3572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Willem Jiang resolved CXF-3572.
-------------------------------

    Resolution: Fixed

Applied patch into trunk and 2.3.x-fixes branch.

> Add a check of the message content list to avoid the OoM error from the 
> HolderOutInterceptor
> --------------------------------------------------------------------------------------------
>
>                 Key: CXF-3572
>                 URL: https://issues.apache.org/jira/browse/CXF-3572
>             Project: CXF
>          Issue Type: Improvement
>          Components: JAX-WS Runtime
>            Reporter: Willem Jiang
>            Assignee: Willem Jiang
>            Priority: Minor
>             Fix For: 2.4.1, 2.3.5
>
>
> The blow code in the HolderOutInterceptor will throw the OOM error when the 
> inObjects is same with the outObjects.
> Although this issue only happens when the Camel route set a wrong response 
> message body, but it could be helpful if CXF can write some error log for it 
> and prevent the OOM error.
> {code}
>      if (!Boolean.TRUE.equals(message.get(Message.REQUESTOR_ROLE))) {
>             List<MessagePartInfo> parts = op.getOutput().getMessageParts();
>             MessageContentsList inObjects = 
> MessageContentsList.getContentsList(exchange.getInMessage());
>             if (inObjects != null) {
>                 for (int x = 0; x < inObjects.size(); x++) {
>                     Object o = inObjects.get(x);
>                     if (o instanceof Holder) {
>                         outObjects.set(x + 1, o);
>                     }
>                 }
>             }
>             ......
>         }
> {code}

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

Reply via email to