# HG changeset patch # User Bjoern Ricks # Date 1347368879 0 # Node ID a33df17ac9bb09035adb71c5aebf1c0ec8d782c3 # Parent 7bc61f4ab26be2e54af7655915607ae838086500 Use getGaugeValue method also for aeo and datum flys-artifacts/trunk@5432 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 7bc61f4ab26b -r a33df17ac9bb flys-artifacts/ChangeLog --- a/flys-artifacts/ChangeLog Tue Sep 11 12:08:08 2012 +0000 +++ b/flys-artifacts/ChangeLog Tue Sep 11 13:07:59 2012 +0000 @@ -1,3 +1,9 @@ +2012-09-11 Björn Ricks + + * src/main/java/de/intevation/flys/artifacts/services/GaugeOverviewInfoService.java: + Use getGaugeValue method also for aeo and datum. Also add some javadoc for + the getGaugeValue method. + 2012-09-11 Christian Lins * doc/conf/second-themes.xml, diff -r 7bc61f4ab26b -r a33df17ac9bb flys-artifacts/src/main/java/de/intevation/flys/artifacts/services/GaugeOverviewInfoService.java --- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/services/GaugeOverviewInfoService.java Tue Sep 11 12:08:08 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/services/GaugeOverviewInfoService.java Tue Sep 11 13:07:59 2012 +0000 @@ -109,8 +109,8 @@ ec.addAttr(eg, "maxq", maxq, true); } - ec.addAttr(eg, "aeo", Double.toString(gauge.getAeo().doubleValue()), true); - ec.addAttr(eg, "datum", Double.toString(gauge.getDatum().doubleValue()), true); + ec.addAttr(eg, "aeo", getGaugeValue(gauge.getAeo()), true); + ec.addAttr(eg, "datum", getGaugeValue(gauge.getDatum()), true); egs.appendChild(eg); } @@ -122,6 +122,9 @@ return result; } + /** + * Returns a Double from a BigDecimal value or null if value is null + */ private String getGaugeValue(BigDecimal value) { if (value == null) { return null;