Mercurial > dive4elements > river
changeset 7094:99527ef3f151
Minor refactoring for 1493.
author | Felix Wolfsteller <felix.wolfsteller@intevation.de> |
---|---|
date | Mon, 23 Sep 2013 11:24:17 +0200 |
parents | 39237f4985a7 |
children | bdadffad35b1 |
files | artifacts/src/main/java/org/dive4elements/river/exports/ChartExportHelper.java |
diffstat | 1 files changed, 9 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/exports/ChartExportHelper.java Fri Sep 20 14:22:44 2013 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/exports/ChartExportHelper.java Mon Sep 23 11:24:17 2013 +0200 @@ -345,16 +345,19 @@ int items = data.getItemCount(i); for (int j = 0; j < items; j++) { log.debug("write data: " + data.getX(i, j) + ", " + data.getY(i, j)); + String xString; + String yString; try { - writer.writeNext(new String[] { - format.format(data.getX(i, j)), - format.format(data.getY(i, j))}); + xString = format.format(data.getX(i, j)); + yString = format.format(data.getY(i, j)); } catch (NumberFormatException nfe) { - writer.writeNext(new String[] { - data.getX(i, j).toString(), - data.getY(i, j).toString()}); + xString = data.getX(i, j).toString(); + yString = data.getY(i, j).toString(); } + writer.writeNext(new String[] { + xString, + yString}); } } }