aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/FilterHandler.java23
1 files changed, 10 insertions, 13 deletions
diff --git a/src/org/traccar/FilterHandler.java b/src/org/traccar/FilterHandler.java
index 8acc06935..62df83378 100644
--- a/src/org/traccar/FilterHandler.java
+++ b/src/org/traccar/FilterHandler.java
@@ -150,36 +150,33 @@ public class FilterHandler extends BaseDataHandler {
private boolean filter(Position p) {
+ boolean result = false;
String filterType = "";
- boolean result = filterInvalid(p) || filterZero(p) || filterDuplicate(p)
- || filterFuture(p) || filterApproximate(p) || filterStatic(p)
- || filterDistance(p);
-
if (filterInvalid(p)) {
- filterType = "Invalid ";
+ filterType = filterType + "Invalid ";
}
if (filterZero(p)) {
- filterType = (filterType + "Zero ");
+ filterType = filterType + "Zero ";
}
if (filterDuplicate(p)) {
- filterType = (filterType + "Duplicate ");
+ filterType = filterType + "Duplicate ";
}
if (filterFuture(p)) {
- filterType = (filterType + "Future ");
+ filterType = filterType + "Future ";
}
if (filterApproximate(p)) {
- filterType = (filterType + "Approximate ");
+ filterType = filterType + "Approximate ";
}
if (filterStatic(p)) {
- filterType = (filterType + "Static ");
+ filterType = filterType + "Static ";
}
if (filterDistance(p)) {
- filterType = (filterType + "Distance ");
+ filterType = filterType + "Distance ";
}
- if (filterLimit(p)) {
- result = false;
+ if (!"".equals(filterType) && !filterLimit(p)) {
+ result = true;
}
if (result) {