From fdd2fdf77cc5152986e26abf79f348b23b24ca64 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 16 Apr 2016 11:09:05 +1200 Subject: Fix IntelliJ improvement suggestion --- src/org/traccar/api/AsyncSocket.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/org/traccar') 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) { -- cgit v1.2.3