geoserver/geoserver — pull request #231 by mbertrand (2013-05-09 16:15:22+00:00)
Title: DataStoreFileResource: enclose cleanup code in a finally block

If GeoServer is importing a shapefile to a PostGIS database, schema creation might fail (line 335) with an IOException ("Error occurred creating table") if the shapefile attributes include reserved column names, and in this case the source will not be disposed nor will the uploaded files directory be deleted. Enclosing these steps in a finally block ensures that they will be run even if such an exception occurs.