comparison artifacts/src/main/java/org/dive4elements/river/artifacts/sinfo/common/SInfoResultType.java @ 9503:83e6acdf8fc6

Fixed: no rounding during calculations (Meilenstein-2 2.9)
author mschaefer
date Fri, 28 Sep 2018 10:11:06 +0200
parents d7d22ea8573d
children 8b457ca70512
comparison
equal deleted inserted replaced
9502:69a7edd7d1e1 9503:83e6acdf8fc6
210 private static final long serialVersionUID = 1L; 210 private static final long serialVersionUID = 1L;
211 211
212 @Override 212 @Override
213 public String exportValue(final CallContext context, final Object value) { 213 public String exportValue(final CallContext context, final Object value) {
214 final double doubleValue = asDouble(value); 214 final double doubleValue = asDouble(value);
215 String rm;
216 try {
217 rm = getFormatter(context).getRoundingMode().toString();
218 }
219 catch (final Exception e) {
220 rm = "?";
221 }
222 log.trace(String.format("meanBedHeight.exportValue roundingmode: %s value: %f doubleValue: %f formatted to: %s",
223 rm, value, doubleValue, exportDoubleValue(context, doubleValue)));
224 return exportDoubleValue(context, doubleValue); 215 return exportDoubleValue(context, doubleValue);
225 } 216 }
226 217
227 @Override 218 @Override
228 protected NumberFormat createFormatter(final CallContext context) { 219 protected NumberFormat createFormatter(final CallContext context) {

http://dive4elements.wald.intevation.org