changeset 6333:b58a71a5720c

Backend: Removed cruft code
author Sascha L. Teichmann <teichmann@intevation.de>
date Fri, 14 Jun 2013 12:30:38 +0200
parents f5bb53106ae8
children 9231940bd192
files backend/src/main/java/org/dive4elements/river/importer/parsers/StaFileParser.java
diffstat 1 files changed, 6 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/backend/src/main/java/org/dive4elements/river/importer/parsers/StaFileParser.java	Thu Jun 13 17:24:56 2013 +0200
+++ b/backend/src/main/java/org/dive4elements/river/importer/parsers/StaFileParser.java	Fri Jun 14 12:30:38 2013 +0200
@@ -51,13 +51,12 @@
         File file = gauge.getStaFile();
 
         log.info("parsing STA file: " + file);
-        LineNumberReader in = null;
+        LineNumberReader in =
+            new LineNumberReader(
+            new InputStreamReader(
+            new FileInputStream(file), ENCODING));
+
         try {
-            in =
-                new LineNumberReader(
-                new InputStreamReader(
-                new FileInputStream(file), ENCODING));
-
             String line = in.readLine();
 
             if (line == null) {
@@ -188,9 +187,7 @@
             gauge.setMainValues(mainValues);
         }
         finally {
-            if (in != null) {
-                in.close();
-            }
+            in.close();
         }
         log.info("finished parsing STA file: " + file);
         return true;

http://dive4elements.wald.intevation.org