![]() |
|
|
|
|
Issue Type:
|
Bug
|
|
Assignee:
|
Andrea Aime
|
|
Attachments:
|
2_0153.shp.zip, ShapefileTest.java |
|
Components:
|
shapefile plugin |
|
Created:
|
02/Oct/12 4:49 PM
|
|
Description:
|
If you attempt to open a shape file with a bad ".prj", then the ".dbf" and ".shp" files are left open. In Windows (for example) this means I can't easily delete or overwrite those files without killing the Java process or waiting a long time for the GC to clean up, even though the DataStore has been disposed.
(I certainly don't expect GeoTools to do anything meaningful with bad files like that. But I would hope that it would clean up after itself so I can delete the files and/or overwrite them later if I catch an exception.)
The offending code is in ShapefileDataStore.readAttributes(). It does not call openPrjReader() inside the try/finally, so the "shp" and "dbf" vars are left open if openPrjReader() throws. In fact, the openDbfReader() call should be moved inside too in case it throws.
An offending shape file can be downloaded here: http://tfr.faa.gov/save_pages/2_0153.shp.zip. I attached it in case this URL goes stale.
My test code demonstrating the problem is also attached.
|
|
Project:
|
GeoTools
|
|
Priority:
|
Major
|
|
Reporter:
|
Christopher S. Dillard
|
|
|
|
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira
|
------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
GeoTools-Devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel