Permalink
Browse files

Fix up postgis-versioned (we need to remove this one)

  • Loading branch information...
1 parent a870544 commit b65de839f71eb23a1132ffcbc3bba5f9dd2d1bb9 @jodygarnett jodygarnett committed Oct 30, 2012
@@ -37,6 +37,7 @@
import org.geotools.data.Transaction;
import org.geotools.data.simple.SimpleFeatureStore;
import org.geotools.feature.FeatureCollection;
+import org.geotools.feature.FeatureIterator;
import org.geotools.feature.NameImpl;
import org.opengis.feature.IllegalAttributeException;
import org.opengis.feature.simple.SimpleFeature;
@@ -380,7 +381,7 @@ public Set addFeatures(FeatureReader <SimpleFeatureType, SimpleFeature> reader)
FeatureWriter<SimpleFeatureType, SimpleFeature> writer = getDataStore().getFeatureWriterAppend(typeName,
getTransaction());
- Iterator iterator = collection.iterator();
+ FeatureIterator iterator = collection.features();
try {
while (iterator.hasNext()) {
try {
@@ -415,7 +416,7 @@ public Set addFeatures(FeatureReader <SimpleFeatureType, SimpleFeature> reader)
addedFids.add(newFeature.getIdentifier());
}
} finally {
- collection.close( iterator );
+ iterator.close();
writer.close();
}
@@ -362,7 +362,7 @@ private FidFilter getEncodableFilter(Filter unEncodableFilter)
fidFilter.addFid(feature.getID());
}
} finally {
- features.close( it );
+ it.close();
}
return fidFilter;
}
@@ -50,6 +50,7 @@
import org.geotools.factory.CommonFactoryFinder;
import org.geotools.factory.Hints;
import org.geotools.feature.FeatureCollection;
+import org.geotools.feature.FeatureIterator;
import org.geotools.feature.IllegalAttributeException;
import org.geotools.feature.simple.SimpleFeatureTypeBuilder;
import org.geotools.geometry.jts.ReferencedEnvelope;
@@ -254,7 +255,7 @@ public SimpleFeatureCollection getVersionedFeatures() throws IOException {
FeatureWriter<SimpleFeatureType, SimpleFeature> writer = getDataStore()
.getFeatureWriterAppend(typeName, getTransaction());
- Iterator iterator = collection.iterator();
+ FeatureIterator<SimpleFeature> iterator = collection.features();
try {
while (iterator.hasNext()) {
@@ -274,7 +275,7 @@ public SimpleFeatureCollection getVersionedFeatures() throws IOException {
addedFids.add(newFeature.getIdentifier());
}
} finally {
- collection.close(iterator);
+ iterator.close();
writer.close();
}
return addedFids;
Oops, something went wrong.

0 comments on commit b65de83

Please sign in to comment.