Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/artifacts/services/GaugeOverviewInfoService.java @ 3747:a33df17ac9bb
Use getGaugeValue method also for aeo and datum
flys-artifacts/trunk@5432 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Bjoern Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Tue, 11 Sep 2012 13:07:59 +0000 |
parents | 0edc05642fa4 |
children | 99f80469ba2b |
line wrap: on
line diff
--- 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;