diff options
Diffstat (limited to 'src/org/traccar/api')
-rw-r--r-- | src/org/traccar/api/AsyncSocket.java | 6 |
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) { |