[Geoserver-devel] [JIRA] (GEOS-7151) SecureCatalogImpl can cause CloseableIterator warnings

Steve Ikeoka created an issue

GeoServer / BugGEOS-7151

SecureCatalogImpl can cause CloseableIterator warnings

Issue Type:

BugBug

Affects Versions:

2.8-M0, 2.7.2

Assignee:

Unassigned

Components:

Main

Created:

10/Aug/15 5:00 PM

Priority:

MediumMedium

Reporter:

Steve Ikeoka

The method org.geoserver.security.SecureCatalogImpl.list(Class<T>, Filter, Integer, Integer, SortBy) is not properly wrapping its CloseableIterator, which causes the warning message “There is code not closing CloseableIterator!!! Auto closing at finalize().” to appear in the logs when the garbage collector runs if the iteratator was not completely consumed (hasNext() returns false).

An example of where this may happen is in the handleRootBbox method in org.geoserver.wms.capabilities.Capabilities_1_3_0_Transformer. This can also happen if there is an exception while processing the iterator which could give the false impression that this is somehow related to causing the exception.

SecureCatalogImpl needs to be updated to use the factory method instead of the constructor.

See discussion here:
http://osgeo-org.1560.x6.nabble.com/Code-not-closing-CloseableIterator-td5073066.html

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v6.5-OD-08-001#65007-sha1:1fc9846)

Atlassian logo