[PATCH] Fixed getBedHeights (removed the obsolete km filtering loop)
Wald Commits
scm-commit at wald.intevation.org
Wed Jul 4 10:47:03 CEST 2018
# HG changeset patch
# User mschaefer
# Date 1530693997 -7200
# Node ID 8642a76f22be5750ba12a0f65d2fb17022d8c1e0
# Parent 13b764afb536cca5fefb2649da526c1785bf7189
Fixed getBedHeights (removed the obsolete km filtering loop)
diff -r 13b764afb536 -r 8642a76f22be backend/src/main/java/org/dive4elements/river/model/BedHeight.java
--- a/backend/src/main/java/org/dive4elements/river/model/BedHeight.java Wed Jul 04 10:36:54 2018 +0200
+++ b/backend/src/main/java/org/dive4elements/river/model/BedHeight.java Wed Jul 04 10:46:37 2018 +0200
@@ -9,7 +9,6 @@
package org.dive4elements.river.model;
import java.io.Serializable;
-import java.util.ArrayList;
import java.util.List;
import javax.persistence.Column;
@@ -219,20 +218,8 @@
query.setParameter("kmto", kmHi);
final List<BedHeight> singles = query.list();
- final List<BedHeight> good = new ArrayList<>();
- for (final BedHeight s : singles) {
- for (final BedHeightValue value : s.getValues()) {
- final double station = value.getStation().doubleValue();
-
- if (station >= kmLo && station <= kmHi) {
- good.add(s);
- break;
- }
- }
- }
-
- return good;
+ return singles;
}
public static BedHeight getBedHeightById(final int id) {
More information about the Dive4Elements-commits
mailing list