aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/api
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-04-16 11:09:05 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2016-04-16 11:09:05 +1200
commitfdd2fdf77cc5152986e26abf79f348b23b24ca64 (patch)
tree6cffcdeecac8a865cfa937de46b0c147f59de729 /src/org/traccar/api
parent7c3493a088f94d8d37d53cab66756947be230276 (diff)
downloadtrackermap-server-fdd2fdf77cc5152986e26abf79f348b23b24ca64.tar.gz
trackermap-server-fdd2fdf77cc5152986e26abf79f348b23b24ca64.tar.bz2
trackermap-server-fdd2fdf77cc5152986e26abf79f348b23b24ca64.zip
Fix IntelliJ improvement suggestion
Diffstat (limited to 'src/org/traccar/api')
-rw-r--r--src/org/traccar/api/AsyncSocket.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/api/AsyncSocket.java b/src/org/traccar/api/AsyncSocket.java
index c289367ea..5353a8d85 100644
--- a/src/org/traccar/api/AsyncSocket.java
+++ b/src/org/traccar/api/AsyncSocket.java
@@ -25,8 +25,8 @@ import org.traccar.web.JsonConverter;
import javax.json.Json;
import javax.json.JsonObjectBuilder;
-import java.util.Arrays;
import java.util.Collection;
+import java.util.Collections;
public class AsyncSocket extends WebSocketAdapter implements ConnectionManager.UpdateListener {
@@ -57,12 +57,12 @@ public class AsyncSocket extends WebSocketAdapter implements ConnectionManager.U
@Override
public void onUpdateDevice(Device device) {
- sendData(KEY_DEVICES, Arrays.asList(device));
+ sendData(KEY_DEVICES, Collections.singletonList(device));
}
@Override
public void onUpdatePosition(Position position) {
- sendData(KEY_POSITIONS, Arrays.asList(position));
+ sendData(KEY_POSITIONS, Collections.singletonList(position));
}
private void sendData(String key, Collection<?> data) {