in uimafit-core/src/main/java/org/apache/uima/fit/pipeline/JCasIterator.java [224:243]
public boolean hasNext() {
if (destroyed) {
return false;
}
boolean error = true;
try {
boolean hasOneMore = collectionReader.hasNext();
error = false;
return hasOneMore;
} catch (CollectionException e) {
throw new IllegalStateException(e);
} catch (IOException e) {
throw new IllegalStateException(e);
} finally {
if (error && selfDestroy) {
destroy();
}
}
}