use of org.apache.jena.mem.TrackingTripleIterator in project jena by apache.
the class GraphContractTest method failingTestDoubleRemoveAll.
@ContractTest
public void failingTestDoubleRemoveAll() {
final Graph g = producer.newInstance();
try {
graphAddTxn(g, "c S d; e:ff GGG hhhh; _i J 27; Ell Em 'en'");
Iterator<Triple> it = new TrackingTripleIterator(g.find(Triple.ANY)) {
@Override
public void remove() {
// removes current
super.remove();
// no-op.
g.delete(current);
}
};
while (it.hasNext()) {
it.next();
it.remove();
}
assertTrue(g.isEmpty());
} catch (UnsupportedOperationException e) {
// No Iterator.remove
}
}
Aggregations