aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2020-03-15 14:47:36 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2020-03-15 14:47:36 -0700
commit57c977d8369c96787c778ac2c27769ec53f24a6e (patch)
tree783f2ba2be409bb94e5049e533a8dc2ec1e2fada /src/main
parente2071c06c0962c083f4f4d5dce5961b08c1920e7 (diff)
downloadtrackermap-server-57c977d8369c96787c778ac2c27769ec53f24a6e.tar.gz
trackermap-server-57c977d8369c96787c778ac2c27769ec53f24a6e.tar.bz2
trackermap-server-57c977d8369c96787c778ac2c27769ec53f24a6e.zip
Improve type casting
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/traccar/BaseProtocolDecoder.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/BaseProtocolDecoder.java b/src/main/java/org/traccar/BaseProtocolDecoder.java
index e6e02c2d6..634ceafd5 100644
--- a/src/main/java/org/traccar/BaseProtocolDecoder.java
+++ b/src/main/java/org/traccar/BaseProtocolDecoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2012 - 2018 Anton Tananaev (anton@traccar.org)
+ * Copyright 2012 - 2020 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -227,9 +227,9 @@ public abstract class BaseProtocolDecoder extends ExtendedObjectDecoder {
if (decodedMessage instanceof Position) {
position = (Position) decodedMessage;
} else if (decodedMessage instanceof Collection) {
- Collection positions = (Collection) decodedMessage;
+ Collection<Position> positions = (Collection) decodedMessage;
if (!positions.isEmpty()) {
- position = (Position) positions.iterator().next();
+ position = positions.iterator().next();
}
}
}