Netcdf reader not disposed on finalize

Description

When using the org.geotools.imageio.unidata.UnidataImageReader in geoserver for Netcdf based coverages, a file descriptor leak occurs because geoserver does not dispose the reader when using JAI.

Other geotools readers do not have this issue because of this code in AbstractGridCoverage2DReader (1045):

/**

  • Forcing disposal of {@link AbstractGridCoverage2DReader} which may keep an {@link ImageInputStream} open.
    */
    @Override
    Throwable {
    dispose();
    .finalize();
    }

I suggest adding this also to the super class of org.geotools.imageio.unidata.UnidataImageReader.

Environment

None

Status

Assignee

Unassigned

Reporter

codehaus

Triage

None

Components

Fix versions

Affects versions

Priority

High
Configure