comparison backend/src/main/java/org/dive4elements/river/importer/parsers/HYKParser.java @ 8856:5e38e2924c07 3.2.x

Fix code style.
author Tom Gottfried <tom@intevation.de>
date Thu, 18 Jan 2018 20:12:01 +0100
parents 139b057a39dd
children 0a5239a1e46e
comparison
equal deleted inserted replaced
8855:d7c005e12af0 8856:5e38e2924c07
182 bottom = new BigDecimal(parts[1]); 182 bottom = new BigDecimal(parts[1]);
183 top = new BigDecimal(parts[2]); 183 top = new BigDecimal(parts[2]);
184 } 184 }
185 catch (NumberFormatException nfe) { 185 catch (NumberFormatException nfe) {
186 log.error( 186 log.error(
187 "HYK: parsing num zones, bottom or top height " + 187 "HYK: parsing num zones, bottom or top height "
188 "failed in line " + in.getLineNumber()); 188 + "failed in line " + in.getLineNumber());
189 return false; 189 return false;
190 } 190 }
191 191
192 if (parts.length > 3) { 192 if (parts.length > 3) {
193 try { 193 try {
264 return false; 264 return false;
265 } 265 }
266 for (int i = 0; i < coords.length; ++i) { 266 for (int i = 0; i < coords.length; ++i) {
267 BigDecimal a = coords[i]; 267 BigDecimal a = coords[i];
268 BigDecimal b = i == coords.length-1 268 BigDecimal b = i == coords.length-1
269 ? (lastZoneEnd != null ? lastZoneEnd : coords[i]) 269 ? (lastZoneEnd != null
270 ? lastZoneEnd
271 : coords[i])
270 : coords[i+1]; 272 : coords[i+1];
271 273
272 if (a.compareTo(b) > 0) { 274 if (a.compareTo(b) > 0) {
273 log.warn("HYK: zone coordinates swapped in line " + 275 log.warn(
276 "HYK: zone coordinates swapped in line " +
274 in.getLineNumber()); 277 in.getLineNumber());
275 BigDecimal c = a; a = b; b = c; 278 BigDecimal c = a; a = b; b = c;
276 } 279 }
277 ImportHYKFlowZone zone = new ImportHYKFlowZone( 280 ImportHYKFlowZone zone = new ImportHYKFlowZone(
278 formation, fzts[i], a, b); 281 formation, fzts[i], a, b);

http://dive4elements.wald.intevation.org