aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2017-10-20 14:42:03 +0500
committerAbyss777 <abyss@fox5.ru>2017-10-20 14:42:03 +0500
commit39be24a58767c05cb7001e77db1bae56cdbe4445 (patch)
tree5ad11938a842a15a25d22f01f456af1eda781972 /src
parentc4191e726f3f0a8ca83ea47f3316a266e5a22b5d (diff)
downloadtrackermap-server-39be24a58767c05cb7001e77db1bae56cdbe4445.tar.gz
trackermap-server-39be24a58767c05cb7001e77db1bae56cdbe4445.tar.bz2
trackermap-server-39be24a58767c05cb7001e77db1bae56cdbe4445.zip
Unwrap ternary operator
Diffstat (limited to 'src')
-rw-r--r--src/org/traccar/database/CommandsManager.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/org/traccar/database/CommandsManager.java b/src/org/traccar/database/CommandsManager.java
index af35965b9..f9feb927d 100644
--- a/src/org/traccar/database/CommandsManager.java
+++ b/src/org/traccar/database/CommandsManager.java
@@ -82,9 +82,9 @@ public class CommandsManager extends ExtendedObjectManager<Command> {
Command command = getById(commandId);
if (lastPosition != null) {
BaseProtocol protocol = Context.getServerManager().getProtocol(lastPosition.getProtocol());
- if ((command.getTextChannel()
- ? protocol.getSupportedTextCommands() : protocol.getSupportedDataCommands())
- .contains(command.getType())) {
+ if (command.getTextChannel() && protocol.getSupportedTextCommands().contains(command.getType())
+ || !command.getTextChannel()
+ && protocol.getSupportedDataCommands().contains(command.getType())) {
result.add(commandId);
}
} else if (command.getType().equals(Command.TYPE_CUSTOM)) {