# HG changeset patch # User Sascha L. Teichmann # Date 1311094870 0 # Node ID 0881cd4be773a9a9e3fa3b9eafb761e69e961c6d # Parent db8d93cb65fdfcd159a498bcad68a1169e89c98b Improved error handling in loading meta data template. flys-artifacts/trunk@2364 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r db8d93cb65fd -r 0881cd4be773 flys-artifacts/ChangeLog --- a/flys-artifacts/ChangeLog Tue Jul 19 16:39:32 2011 +0000 +++ b/flys-artifacts/ChangeLog Tue Jul 19 17:01:10 2011 +0000 @@ -1,4 +1,9 @@ -2011-07-15 Sascha L. Teichmann +2011-07-19 Sascha L. Teichmann + + * src/main/java/de/intevation/flys/artifacts/services/MetaDataService.java: + Improved error handling. + +2011-07-19 Sascha L. Teichmann * src/main/resources/metadata/template.xml: Deleted. @@ -9,7 +14,7 @@ * src/main/java/de/intevation/flys/artifacts/services/MetaDataService.java: Load template from configuration not from resources. -2011-07-15 Sascha L. Teichmann +2011-07-19 Sascha L. Teichmann * src/main/resources/metadata/template.xml: s/[a-z]+-id/db-id/ Make database ids identifiable with unique name "db-id". diff -r db8d93cb65fd -r 0881cd4be773 flys-artifacts/src/main/java/de/intevation/flys/artifacts/services/MetaDataService.java --- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/services/MetaDataService.java Tue Jul 19 16:39:32 2011 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/services/MetaDataService.java Tue Jul 19 17:01:10 2011 +0000 @@ -136,11 +136,13 @@ log.error(ioe); } finally { - try { - in.close(); - } - catch (IOException ioe) { - log.error(ioe); + if (in != null) { + try { + in.close(); + } + catch (IOException ioe) { + log.error(ioe); + } } } }