[PATCH] Removed obsolete import + whitespace cleanup
Wald Commits
scm-commit at wald.intevation.org
Thu Oct 17 12:11:14 CEST 2013
# HG changeset patch
# User Sascha L. Teichmann <teichmann at intevation.de>
# Date 1382004669 -7200
# Node ID 495cde9257020bef59c596926cb1f1df4cebebe3
# Parent 6baaa700eada94627fb897a3a54efc9afefdd38b
Removed obsolete import + whitespace cleanup.
diff -r 6baaa700eada -r 495cde925702 backend/src/main/java/org/dive4elements/river/importer/parsers/BedHeightSingleParser.java
--- a/backend/src/main/java/org/dive4elements/river/importer/parsers/BedHeightSingleParser.java Thu Oct 17 08:29:46 2013 +0200
+++ b/backend/src/main/java/org/dive4elements/river/importer/parsers/BedHeightSingleParser.java Thu Oct 17 12:11:09 2013 +0200
@@ -8,8 +8,6 @@
package org.dive4elements.river.importer.parsers;
-import java.math.BigDecimal;
-
import java.text.ParseException;
import org.apache.log4j.Logger;
@@ -25,14 +23,12 @@
Logger.getLogger(BedHeightSingleParser.class);
-
@Override
protected ImportBedHeight newImportBedHeight(String description) {
return new ImportBedHeightSingle(description);
}
-
/**
* Create ImportBedHeightSingleValue from a line of csv file, add
* it to the ImportBedHeight.
@@ -50,7 +46,7 @@
try {
km = new Double(nf.parse(values[0]).doubleValue());
-
+
Double key = Double.valueOf(km);
if (kmExists.contains(key)) {
@@ -59,8 +55,7 @@
}
kmExists.add(key);
- }
-
+ }
catch (ParseException e) {
// We expect a lot of ";;;;;;" lines.
return;
@@ -72,67 +67,66 @@
return;
}
- Double height = null;
- if (values[1].length() > 0) {
- try {
- height = new Double(nf.parse(values[1]).doubleValue());
- }
- catch (ParseException e) {
- log.warn("BSP: unparseable height " + values[1]);
- }
- }
+ Double height = null;
+ if (values[1].length() > 0) {
+ try {
+ height = new Double(nf.parse(values[1]).doubleValue());
+ }
+ catch (ParseException e) {
+ log.warn("BSP: unparseable height " + values[1]);
+ }
+ }
- Double uncertainty = null;
- if (values[2].length() > 0) {
- try {
- uncertainty = new Double(nf.parse(values[2]).doubleValue());
- }
- catch (ParseException e) {
- log.warn("BSP: unparseable uncertainty value " + values[2]);
- }
- }
+ Double uncertainty = null;
+ if (values[2].length() > 0) {
+ try {
+ uncertainty = new Double(nf.parse(values[2]).doubleValue());
+ }
+ catch (ParseException e) {
+ log.warn("BSP: unparseable uncertainty value " + values[2]);
+ }
+ }
- Double dataGap = null;
- if (values[3].length() > 0) {
- try {
- dataGap = new Double(nf.parse(values[3]).doubleValue());
- }
- catch (ParseException e) {
- log.warn("BSP: unparseable data gap " + values[3]);
- }
- }
+ Double dataGap = null;
+ if (values[3].length() > 0) {
+ try {
+ dataGap = new Double(nf.parse(values[3]).doubleValue());
+ }
+ catch (ParseException e) {
+ log.warn("BSP: unparseable data gap " + values[3]);
+ }
+ }
- Double soundingWidth = null;
- if (values[4].length() > 0) {
- try {
- soundingWidth = new Double(nf.parse(values[4]).doubleValue());
- }
- catch (ParseException e) {
- log.warn("BSP: unparseable sounding width " + values[4]);
- }
- }
+ Double soundingWidth = null;
+ if (values[4].length() > 0) {
+ try {
+ soundingWidth = new Double(nf.parse(values[4]).doubleValue());
+ }
+ catch (ParseException e) {
+ log.warn("BSP: unparseable sounding width " + values[4]);
+ }
+ }
- Double width = null;
- if (values[5].length() > 0) {
- try {
- width = new Double(nf.parse(values[5]).doubleValue());
- }
- catch (ParseException e) {
- log.warn("BSP: unparseable width " + values[5]);
- }
- }
+ Double width = null;
+ if (values[5].length() > 0) {
+ try {
+ width = new Double(nf.parse(values[5]).doubleValue());
+ }
+ catch (ParseException e) {
+ log.warn("BSP: unparseable width " + values[5]);
+ }
+ }
- ImportBedHeightSingleValue value = new ImportBedHeightSingleValue(
- (ImportBedHeightSingle) obj,
- km,
- height,
- uncertainty,
- dataGap,
- soundingWidth,
- width
- );
+ ImportBedHeightSingleValue value = new ImportBedHeightSingleValue(
+ (ImportBedHeightSingle) obj,
+ km,
+ height,
+ uncertainty,
+ dataGap,
+ soundingWidth,
+ width);
- obj.addValue(value);
+ obj.addValue(value);
}
}
// vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
More information about the Dive4elements-commits
mailing list