Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
Patch Available
Description
I am seeing a memory leak due to the XML Stream reader not being closed when void return types are used. I modified the Output2OutputTransformer
to close() the stream when a void return is encountered. Here is snippit. I attached the source code..
if ((!sourceWrapped) && targetWrapped) {
// Unwrapped --> Wrapped
WrapperInfo wrapper = targetOp.getWrapper();
Object targetWrapper = targetWrapperHandler.create(wrapper.getOutputWrapperElement(), context);
List<ElementInfo> childElements = wrapper.getOutputChildElements();
if (childElements.isEmpty())
ElementInfo argElement = childElements.get(0);
DataType<XMLType> argType = wrapper.getUnwrappedOutputType();
Object child = response;
child = mediator.mediate(response, sourceType.getLogical(), argType, context.getMetadata());
targetWrapperHandler.setChild(targetWrapper, 0, argElement, child);
return targetWrapper;
} else if (sourceWrapped && (!targetWrapped)) {
// Wrapped to Unwrapped
Object sourceWrapper = response;
List<ElementInfo> childElements = sourceOp.getWrapper().getOutputChildElements();
if (childElements.isEmpty())