diff flys-artifacts/src/main/java/de/intevation/flys/artifacts/services/MetaDataService.java @ 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 22bc87a42a0d
line wrap: on
line diff
--- 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);
+                }
             }
         }
     }

http://dive4elements.wald.intevation.org