diff options
author | Renaud Allard <renaud@allard.it> | 2016-10-17 23:42:17 +0200 |
---|---|---|
committer | Renaud Allard <renaud@allard.it> | 2016-10-17 23:42:17 +0200 |
commit | 8756277141ff7549cb0a019e8f67bef58948bd59 (patch) | |
tree | 8475376e0a6ffe49edda4fc2a750809f53b5cd1c /src | |
parent | 4b47a62d2dc0dd7f1b7ced01a7e6c7887e3840ad (diff) | |
download | trackermap-server-8756277141ff7549cb0a019e8f67bef58948bd59.tar.gz trackermap-server-8756277141ff7549cb0a019e8f67bef58948bd59.tar.bz2 trackermap-server-8756277141ff7549cb0a019e8f67bef58948bd59.zip |
Use StringBuilder for filter logging
Diffstat (limited to 'src')
-rw-r--r-- | src/org/traccar/FilterHandler.java | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/org/traccar/FilterHandler.java b/src/org/traccar/FilterHandler.java index 62df83378..725f9c429 100644 --- a/src/org/traccar/FilterHandler.java +++ b/src/org/traccar/FilterHandler.java @@ -151,36 +151,36 @@ public class FilterHandler extends BaseDataHandler { private boolean filter(Position p) { boolean result = false; - String filterType = ""; + StringBuilder filterType = new StringBuilder(8 + 5 + 10 + 7 + 12 + 7 + 9); if (filterInvalid(p)) { - filterType = filterType + "Invalid "; + filterType.append("Invalid "); } if (filterZero(p)) { - filterType = filterType + "Zero "; + filterType.append("Zero "); } if (filterDuplicate(p)) { - filterType = filterType + "Duplicate "; + filterType.append("Duplicate "); } if (filterFuture(p)) { - filterType = filterType + "Future "; + filterType.append("Future "); } if (filterApproximate(p)) { - filterType = filterType + "Approximate "; + filterType.append("Approximate "); } if (filterStatic(p)) { - filterType = filterType + "Static "; + filterType.append("Static "); } if (filterDistance(p)) { - filterType = filterType + "Distance "; + filterType.append("Distance "); } - if (!"".equals(filterType) && !filterLimit(p)) { + if (!"".equals(filterType.toString()) && !filterLimit(p)) { result = true; } if (result) { - Log.info("Position filtered by " + filterType + "filters from " + p.getDeviceId()); + Log.info("Position filtered by " + filterType.toString() + "filters from " + p.getDeviceId()); } return result; |