[Dive4elements-commits] [PATCH] Whitespace correction and cminor ruft code removal
Wald Commits
scm-commit at wald.intevation.org
Wed Jun 12 10:43:51 CEST 2013
# HG changeset patch
# User Sascha L. Teichmann <teichmann at intevation.de>
# Date 1371026610 -7200
# Node ID f55a99fe5ce33ca26640ab0bb40a0b3f3471b735
# Parent f50d8cee3b64c7fbaba825af964a92ec95296236
Whitespace correction and cminor ruft code removal.
diff -r f50d8cee3b64 -r f55a99fe5ce3 backend/src/main/java/org/dive4elements/river/importer/parsers/BedHeightParser.java
--- a/backend/src/main/java/org/dive4elements/river/importer/parsers/BedHeightParser.java Wed Jun 12 10:34:43 2013 +0200
+++ b/backend/src/main/java/org/dive4elements/river/importer/parsers/BedHeightParser.java Wed Jun 12 10:43:30 2013 +0200
@@ -115,13 +115,12 @@
ImportBedHeight obj = newImportBedHeight(file.getName().replaceAll("\\.csv", ""));
- LineNumberReader in = null;
+ LineNumberReader in =
+ new LineNumberReader(
+ new InputStreamReader(
+ new FileInputStream(file), ENCODING));
+
try {
- in =
- new LineNumberReader(
- new InputStreamReader(
- new FileInputStream(file), ENCODING));
-
String line = null;
while ((line = in.readLine()) != null) {
if ((line = line.trim()).length() == 0) {
@@ -140,9 +139,7 @@
bedHeights.add(obj);
}
finally {
- if (in != null) {
- in.close();
- }
+ in.close();
}
}
@@ -161,7 +158,7 @@
public static Date getStartDateFromYear(int year) {
Calendar cal = Calendar.getInstance();
- cal.clear();
+ cal.clear();
cal.set(year, 0, 1, 0, 0, 0);
return cal.getTime();
@@ -349,7 +346,7 @@
String tmp = m.group(1).replace(";", "").trim();
BedHeightType bht = BedHeightType.fetchBedHeightTypeForType(
- tmp, ImporterSession.getInstance().getDatabaseSession());
+ tmp, ImporterSession.getInstance().getDatabaseSession());
if (bht != null) {
obj.setType(new ImportBedHeightType(bht));
More information about the Dive4elements-commits
mailing list