# HG changeset patch # User Felix Wolfsteller # Date 1379928257 -7200 # Node ID 99527ef3f1510717a6f561ee8a3ae44ca4d31b04 # Parent 39237f4985a705b399f8aff70c33058c3b6fff3c Minor refactoring for 1493. diff -r 39237f4985a7 -r 99527ef3f151 artifacts/src/main/java/org/dive4elements/river/exports/ChartExportHelper.java --- 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}); } } }