Revision 1688 tmp/org.txm.core/src/java/org/txm/scripts/importer/MetadataGetter.groovy

MetadataGetter.groovy (revision 1688)
15 15
					for (int i = 0 ; i < parser.getAttributeCount() ; i++) {
16 16
						if(prop.equals(parser.getAttributeLocalName(i))) {
17 17
							String tmp = parser.getAttributeValue(i)
18
							parser.close()
18
							if (parser != null) parser.close();
19
							if (inputData != null) inputData.close();
19 20
							return tmp
20 21
						}
21 22
					}
22 23
				}
23 24
			}
24 25
		}
25
		parser.close()
26
		if (parser != null) parser.close();
27
		if (inputData != null) inputData.close();
26 28
		return null;
27 29
	}
28 30

  

Also available in: Unified diff