Changeset 33378 in osm
- Timestamp:
- 2017-06-07T14:51:46+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/opendata/src/org/openstreetmap/josm/plugins/opendata/core/io/geographic/ShpReader.java
r32545 r33378 214 214 FeatureSource<?, ?> featureSource = dataStore.getFeatureSource(typeName); 215 215 FeatureCollection<?, ?> collection = featureSource.getFeatures(); 216 FeatureIterator<?> iterator = collection.features();217 216 218 217 if (instance != null) { … … 224 223 Component parent = instance != null ? instance.getWindowParent() : Main.parent; 225 224 226 try {225 try (FeatureIterator<?> iterator = collection.features()) { 227 226 while (iterator.hasNext()) { 228 227 n++; … … 243 242 } 244 243 } finally { 245 iterator.close();246 244 nodes.clear(); 247 245 if (instance != null) { … … 251 249 } 252 250 } catch (IOException e) { 253 e.printStackTrace();251 Main.error(e); 254 252 throw e; 255 253 } catch (Exception e) { 256 e.printStackTrace();254 Main.error(e); 257 255 throw new IOException(e); 258 256 }
Note:
See TracChangeset
for help on using the changeset viewer.