Revision 1688 tmp/org.txm.groovy.core/src/groovy/org/txm/scripts/importer/xml/compiler.groovy

compiler.groovy (revision 1688)
384 384
			}
385 385
			//output.write("</txmcorpus>");
386 386
			output.close();
387
			parser.close();
387
			if (parser != null) parser.close();
388
		if (inputData != null) inputData.close();
388 389
		} catch (Exception ex) {
389 390
			System.out.println("Exception while parsing " + inputData+" of Text "+text);
390 391
			File xmlFile = null
......
398 399
			} catch(Exception eCopy) {
399 400
				println "Error while moving "+url+" to "+errorDir
400 401
			}
402
			if (parser != null) parser.close();
403
			if (inputData != null) inputData.close();
401 404
			return false;
402 405
		}
403 406
		return true;
......
421 424
				}
422 425
			}
423 426
		}
424
		parser.close()
427
		
428
		if (parser != null) parser.close();
429
		if (inputData != null) inputData.close();
425 430

  
426 431
		for (String type : types)
427 432
			if (!anatypes.contains(type))

Also available in: Unified diff