Author: groldan
Date: 2009-11-02 03:31:56 -0500 (Mon, 02 Nov 2009)
New Revision: 34305
Modified:
trunk/modules/plugin/arcsde/datastore/src/main/java/org/geotools/arcsde/gce/ArcSDETiledImageInputStream.java
Log:
GEOT-2616, preemptively dispose TileReader
Modified: trunk/modules/plugin/arcsde/datastore/src/main/java/org/geotools/arcsde/gce/ArcSDETiledImageInputStream.java
===================================================================
--- trunk/modules/plugin/arcsde/datastore/src/main/java/org/geotools/arcsde/gce/ArcSDETiledImageInputStream.java 2009-11-02 07:11:02 UTC (rev 34304)
+++ trunk/modules/plugin/arcsde/datastore/src/main/java/org/geotools/arcsde/gce/ArcSDETiledImageInputStream.java 2009-11-02 08:31:56 UTC (rev 34305)
@@ -77,6 +77,7 @@
public int read() throws IOException {
final byte[] data = getTileData();
if (data == null) {
+ close();
return -1;
}
byte b = data[currTileDataIndex];
@@ -89,6 +90,7 @@
public int read(byte[] buff, int off, int len) throws IOException {
final byte[] data = getTileData();
if (data == null) {
+ close();
return -1;
}
final int available = data.length - currTileDataIndex;
@@ -120,7 +122,11 @@
currTileDataIndex = 0;
++currTileIndex;
TileInfo tile = tileReader.next();
- currTileData = tile.getTileData();
+ currTileData = tile.getTileData();
+
+ if (!tileReader.hasNext()) {
+ tileReader.dispose();
+ }
}
return currTileData;
}
@@ -130,5 +136,4 @@
tileReader.dispose();
super.close();
}
-
}
\ No newline at end of file
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference_______________________________________________
GeoTools-commits mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/geotools-commits