aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-07-14 12:12:04 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-07-14 12:12:04 +1200
commitc21773be3d8e5626f3830e35af8a6659cae24522 (patch)
tree0436e270fd9444a66ef14a23a36767931570991a /src/org/traccar/database
parentd1cc97f991fa223cc115fb073f96963a71f4956f (diff)
downloadtrackermap-server-c21773be3d8e5626f3830e35af8a6659cae24522.tar.gz
trackermap-server-c21773be3d8e5626f3830e35af8a6659cae24522.tar.bz2
trackermap-server-c21773be3d8e5626f3830e35af8a6659cae24522.zip
Use diamond operator for generics
Diffstat (limited to 'src/org/traccar/database')
-rw-r--r--src/org/traccar/database/ConnectionManager.java8
-rw-r--r--src/org/traccar/database/DataManager.java2
-rw-r--r--src/org/traccar/database/PermissionsManager.java4
-rw-r--r--src/org/traccar/database/QueryBuilder.java8
4 files changed, 11 insertions, 11 deletions
diff --git a/src/org/traccar/database/ConnectionManager.java b/src/org/traccar/database/ConnectionManager.java
index eb22379da..0d357a41c 100644
--- a/src/org/traccar/database/ConnectionManager.java
+++ b/src/org/traccar/database/ConnectionManager.java
@@ -31,9 +31,9 @@ import org.traccar.model.Position;
public class ConnectionManager {
- private Map<String, ActiveDevice> activeDevices = new HashMap<String, ActiveDevice>();
- private final Map<Long, Position> positions = new HashMap<Long, Position>();
- private final Map<Long, Set<DataCacheListener>> listeners = new HashMap<Long, Set<DataCacheListener>>();
+ private Map<String, ActiveDevice> activeDevices = new HashMap<>();
+ private final Map<Long, Position> positions = new HashMap<>();
+ private final Map<Long, Set<DataCacheListener>> listeners = new HashMap<>();
public void init(DataManager dataManager) {
try {
@@ -70,7 +70,7 @@ public class ConnectionManager {
public synchronized Collection<Position> getInitialState(Collection<Long> devices) {
- List<Position> result = new LinkedList<Position>();
+ List<Position> result = new LinkedList<>();
for (long device : devices) {
if (positions.containsKey(device)) {
diff --git a/src/org/traccar/database/DataManager.java b/src/org/traccar/database/DataManager.java
index b7ecac52b..48f3228ce 100644
--- a/src/org/traccar/database/DataManager.java
+++ b/src/org/traccar/database/DataManager.java
@@ -50,7 +50,7 @@ public class DataManager implements IdentityManager {
private DataSource dataSource;
- private final Map<String, Device> devices = new HashMap<String, Device>();
+ private final Map<String, Device> devices = new HashMap<>();
private long devicesLastUpdate;
private final long devicesRefreshDelay;
diff --git a/src/org/traccar/database/PermissionsManager.java b/src/org/traccar/database/PermissionsManager.java
index 683f54cb4..40783ad98 100644
--- a/src/org/traccar/database/PermissionsManager.java
+++ b/src/org/traccar/database/PermissionsManager.java
@@ -28,9 +28,9 @@ import org.traccar.model.User;
public class PermissionsManager {
- private final Map<Long, User> users = new HashMap<Long, User>();
+ private final Map<Long, User> users = new HashMap<>();
- private final Map<Long, Set<Long>> permissions = new HashMap<Long, Set<Long>>();
+ private final Map<Long, Set<Long>> permissions = new HashMap<>();
private Set<Long> getNotNull(long userId) {
if (!permissions.containsKey(userId)) {
diff --git a/src/org/traccar/database/QueryBuilder.java b/src/org/traccar/database/QueryBuilder.java
index 583a18539..85881a736 100644
--- a/src/org/traccar/database/QueryBuilder.java
+++ b/src/org/traccar/database/QueryBuilder.java
@@ -36,7 +36,7 @@ import org.traccar.model.Factory;
public class QueryBuilder {
- private final Map<String, List<Integer>> indexMap = new HashMap<String, List<Integer>>();
+ private final Map<String, List<Integer>> indexMap = new HashMap<>();
private Connection connection;
private PreparedStatement statement;
private final String query;
@@ -106,7 +106,7 @@ public class QueryBuilder {
// Add to list
List<Integer> indexList = paramMap.get(name);
if (indexList == null) {
- indexList = new LinkedList<Integer>();
+ indexList = new LinkedList<>();
paramMap.put(name, indexList);
}
indexList.add(index);
@@ -133,7 +133,7 @@ public class QueryBuilder {
name = name.toLowerCase();
List<Integer> result = indexMap.get(name);
if (result == null) {
- result = new LinkedList<Integer>();
+ result = new LinkedList<>();
}
return result;
}
@@ -298,7 +298,7 @@ public class QueryBuilder {
ResultSetMetaData resultMetaData = resultSet.getMetaData();
- List<ResultSetProcessor<T>> processors = new LinkedList<ResultSetProcessor<T>>();
+ List<ResultSetProcessor<T>> processors = new LinkedList<>();
Method[] methods = prototype.getClass().getMethods();