Mercurial > dive4elements > river
comparison gwt-client/src/main/java/org/dive4elements/river/client/client/ui/LocationDistancePanel.java @ 9270:7337034eb5d5
multiple whitespace input fix
author | gernotbelger |
---|---|
date | Thu, 19 Jul 2018 13:36:38 +0200 |
parents | 34dc0163ad2d |
children |
comparison
equal
deleted
inserted
replaced
9269:83ebeb620b5a | 9270:7337034eb5d5 |
---|---|
457 final List<Data> items = dataList.getAll(); | 457 final List<Data> items = dataList.getAll(); |
458 | 458 |
459 final Data dLocations = getData(items, "ld_locations"); | 459 final Data dLocations = getData(items, "ld_locations"); |
460 final DataItem[] lItems = dLocations.getItems(); | 460 final DataItem[] lItems = dLocations.getItems(); |
461 | 461 |
462 final String[] splitted = lItems[0].getStringValue().split(" "); | 462 final String[] splitted = StringArrayParseHelper.getArrayFromRawString(lItems[0].getStringValue()); |
463 String value = ""; | 463 String value = ""; |
464 for (final String element : splitted) { | 464 for (final String element : splitted) { |
465 try { | 465 try { |
466 final NumberFormat nf = NumberFormat.getDecimalFormat(); | 466 final NumberFormat nf = NumberFormat.getDecimalFormat(); |
467 final double dv = Double.parseDouble(element); | 467 final double dv = Double.parseDouble(element); |
1213 this.values = values; | 1213 this.values = values; |
1214 this.locationPanel.setValues(values); | 1214 this.locationPanel.setValues(values); |
1215 } | 1215 } |
1216 | 1216 |
1217 protected void setLocationValues(final String values) { | 1217 protected void setLocationValues(final String values) { |
1218 final String[] vs = values.split(" "); | 1218 final String[] vs = StringArrayParseHelper.getArrayFromRawString(values); |
1219 | |
1220 if (vs == null) { | 1219 if (vs == null) { |
1221 return; | 1220 return; |
1222 } | 1221 } |
1223 | 1222 |
1224 final double[] ds = new double[vs.length]; | 1223 final double[] ds = new double[vs.length]; |