ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shalg...@apache.org
Subject svn commit: r1550450 - /ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/eval/XMIReader.java
Date Thu, 12 Dec 2013 16:49:07 GMT
Author: shalgrim
Date: Thu Dec 12 16:49:07 2013
New Revision: 1550450

URL: http://svn.apache.org/r1550450
Log:
close inputStream in case of SAXException

Modified:
    ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/eval/XMIReader.java

Modified: ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/eval/XMIReader.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/eval/XMIReader.java?rev=1550450&r1=1550449&r2=1550450&view=diff
==============================================================================
--- ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/eval/XMIReader.java
(original)
+++ ctakes/trunk/ctakes-assertion/src/main/java/org/apache/ctakes/assertion/eval/XMIReader.java
Thu Dec 12 16:49:07 2013
@@ -70,12 +70,13 @@ public class XMIReader extends JCasColle
     return this.filesIter.hasNext();
   }
 
-  @Override
+@Override
   public void getNext(JCas jCas) throws IOException, CollectionException {
     FileInputStream inputStream = new FileInputStream(this.filesIter.next());
     try {
       XmiCasDeserializer.deserialize(new BufferedInputStream(inputStream), jCas.getCas());
     } catch (SAXException e) {
+      inputStream.close();
       throw new CollectionException(e);
     }
     inputStream.close();



Mime
View raw message