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

compiler.groovy (revision 1688)
321 321
			}
322 322

  
323 323
			output.close();
324
			parser.close();
324
			if (parser != null) parser.close();
325
		if (inputData != null) inputData.close();
325 326
		}
326 327
		catch (Exception ex) {
327 328
			System.out.println("Error while writing CQP file $ex");
328 329
			ex.printStackTrace();
330
			if (parser != null) parser.close();
331
			if (inputData != null) inputData.close();
329 332
			return false;
330 333
		}
331 334
		return true;
......
511 514
				}
512 515
			}
513 516
		}
514
		parser.close()
517
		
518
		if (parser != null) parser.close();
519
		if (inputData != null) inputData.close();
515 520

  
516 521
		for (String type : types)
517 522
			if (!anatypes.contains(type))

Also available in: Unified diff