diff options
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/traccar/database/QueryBuilder.java | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/main/java/org/traccar/database/QueryBuilder.java b/src/main/java/org/traccar/database/QueryBuilder.java index f57f27e88..084d2940b 100644 --- a/src/main/java/org/traccar/database/QueryBuilder.java +++ b/src/main/java/org/traccar/database/QueryBuilder.java @@ -114,11 +114,7 @@ public final class QueryBuilder { name = name.toLowerCase(); // Add to list - List<Integer> indexList = paramMap.get(name); - if (indexList == null) { - indexList = new LinkedList<>(); - paramMap.put(name, indexList); - } + List<Integer> indexList = paramMap.computeIfAbsent(name, k -> new LinkedList<>()); indexList.add(index); index++; |