Mercurial > dive4elements > river
changeset 948:0881cd4be773
Improved error handling in loading meta data template.
flys-artifacts/trunk@2364 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Tue, 19 Jul 2011 17:01:10 +0000 |
parents | db8d93cb65fd |
children | ea56940bfc4c |
files | flys-artifacts/ChangeLog flys-artifacts/src/main/java/de/intevation/flys/artifacts/services/MetaDataService.java |
diffstat | 2 files changed, 14 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- 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 <sascha.teichmann@intevation.de> +2011-07-19 Sascha L. Teichmann <sascha.teichmann@intevation.de> + + * src/main/java/de/intevation/flys/artifacts/services/MetaDataService.java: + Improved error handling. + +2011-07-19 Sascha L. Teichmann <sascha.teichmann@intevation.de> * 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 <sascha.teichmann@intevation.de> +2011-07-19 Sascha L. Teichmann <sascha.teichmann@intevation.de> * src/main/resources/metadata/template.xml: s/[a-z]+-id/db-id/ Make database ids identifiable with unique name "db-id".
--- 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); + } } } }