[Geoserver-devel] [JIRA] (GEOS-7312) RawDataPPIO does not close InputStreams it opens

Craig Jones created an issue

GeoServer / BugGEOS-7312

RawDataPPIO does not close InputStreams it opens

Issue Type:

BugBug

Affects Versions:

2.8.0

Assignee:

Unassigned

Components:

WPS

Created:

13/Nov/15 5:33 AM

Priority:

MediumMedium

Reporter:

Craig Jones

Refer https://github.com/geoserver/geoserver/blob/master/src/extension/wps/wps-core/src/main/java/org/geoserver/wps/ppio/RawDataPPIO.java#L52

@Override
public void encode(Object value, OutputStream os) throws Exception

{ RawData rd = (RawData) value; IOUtils.copy(rd.getInputStream(), os); }

I don’t believe IOUtils.copy closes inputstreams so looks to me like this inputstream will never be closed (it certainly didn’t when I debugged into the copy method). Looks like this should be wrapped in a try finally IOUtils.closeQuietly block

Also refer http://osgeo-org.1560.x6.nabble.com/Need-advice-on-managing-resources-for-WPS-in-Geoserver-td5208596.html and in particular the resource leak issues Julian was referring to.

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v7.0.0-OD-08-005#70107-sha1:5fb2f7e)

Atlassian logo