changeset 1480:1f2f08211a5f

Skip empty lines in CSV service. flys-client/trunk@3533 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Fri, 23 Dec 2011 06:59:38 +0000
parents 2f525f54e429
children 3dc70e44fc95
files flys-client/ChangeLog flys-client/src/main/java/de/intevation/flys/client/server/CSVExportServiceImpl.java
diffstat 2 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/flys-client/ChangeLog	Thu Dec 22 17:28:15 2011 +0000
+++ b/flys-client/ChangeLog	Fri Dec 23 06:59:38 2011 +0000
@@ -1,3 +1,8 @@
+2011-12-23  Ingo Weinzierl <ingo@intevation.de>
+
+	* src/main/java/de/intevation/flys/client/server/CSVExportServiceImpl.java:
+	  Skip empty lines.
+
 2011-12-22  Raimund Renkert <raimund.renkert@intevation.de>
 
 	Issue 427.
--- a/flys-client/src/main/java/de/intevation/flys/client/server/CSVExportServiceImpl.java	Thu Dec 22 17:28:15 2011 +0000
+++ b/flys-client/src/main/java/de/intevation/flys/client/server/CSVExportServiceImpl.java	Fri Dec 23 06:59:38 2011 +0000
@@ -75,9 +75,11 @@
             String[]       line  = null;
 
             while ((line = csvReader.readNext()) != null) {
-                if (line != null && line.length > 0) {
-                    if (!line[0].startsWith("#")) {
-                        lines.add(line);
+                if (line != null) {
+                    if (!line[0].startsWith("#") && line.length > 0) {
+                        if (line[0].replace("'", "").length() > 0) {
+                            lines.add(line);
+                        }
                     }
                 }
             }

http://dive4elements.wald.intevation.org