# HG changeset patch # User Felix Wolfsteller # Date 1351589737 -3600 # Node ID 8d3523bbb088f13e1100f395fa855b52623b8c12 # Parent 46511b4d8357881f63ec890a964dc4b704c5d359 NaviChartOutputTab: Use final var instead of alloc-on-the-fly in each callback. diff -r 46511b4d8357 -r 8d3523bbb088 flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/NaviChartOutputTab.java --- a/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/NaviChartOutputTab.java Tue Oct 30 09:08:15 2012 +0100 +++ b/flys-client/src/main/java/de/intevation/flys/client/client/ui/chart/NaviChartOutputTab.java Tue Oct 30 10:35:37 2012 +0100 @@ -96,7 +96,7 @@ collectionView.setMinKm(fix.getFilter().getFromKm()); collectionView.setMaxKm(fix.getFilter().getToKm()); - NumberFormat nf = NumberFormat.getDecimalFormat(); + final NumberFormat nf = NumberFormat.getDecimalFormat(); if (collectionView.getCurrentKm() == -1d) { try { double d = Double.valueOf(fix.getFilter().getFromKm()); @@ -121,7 +121,6 @@ tbarPanel.deselectControls(); updateChartDown(); try { - NumberFormat nf = NumberFormat.getDecimalFormat(); double d = Double.valueOf(collectionView.getCurrentKm()); currentkm.setValue(nf.format(d)); } catch (NumberFormatException e) { @@ -135,7 +134,6 @@ tbarPanel.deselectControls(); updateChartUp(); try { - NumberFormat nf = NumberFormat.getDecimalFormat(); double d = Double.valueOf(collectionView.getCurrentKm()); currentkm.setValue(nf.format(d)); } catch (NumberFormatException e) { @@ -155,7 +153,6 @@ String s = kpe.getItem().getValue().toString(); double d; try { - NumberFormat nf = NumberFormat.getDecimalFormat(); d = nf.parse(s); currentkm.setValue(nf.format(d)); } catch (NumberFormatException e) {