Mercurial > dive4elements > river
changeset 8347:1c732c88a2d6
There ist no need to format a number as a string and then re-parse it to double to get its double value. Just take the double value!
author | Sascha L. Teichmann <teichmann@intevation.de> |
---|---|
date | Wed, 01 Oct 2014 12:01:46 +0200 |
parents | 31272d799dad |
children | dc3f55141299 |
files | artifacts/src/main/java/org/dive4elements/river/artifacts/model/GaugeDischargeCurveFacet.java |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/artifacts/model/GaugeDischargeCurveFacet.java Wed Oct 01 11:07:52 2014 +0200 +++ b/artifacts/src/main/java/org/dive4elements/river/artifacts/model/GaugeDischargeCurveFacet.java Wed Oct 01 12:01:46 2014 +0200 @@ -84,7 +84,7 @@ if (!(pnpObject instanceof Number)) { return new WQKms(kms, values[0], values[1], name, W.CENTIMETER_AT_GAUGE); } - double pnp = Double.valueOf(pnpObject.toString()); + double pnp = ((Number)pnpObject).doubleValue(); double[] ws = transformToM(values[1], pnp); return new WQKms(kms, values[0], ws, name);