aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/database
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/org/traccar/database
parentc4191e726f3f0a8ca83ea47f3316a266e5a22b5d (diff)
downloadtraccar-server-39be24a58767c05cb7001e77db1bae56cdbe4445.tar.gz
traccar-server-39be24a58767c05cb7001e77db1bae56cdbe4445.tar.bz2
traccar-server-39be24a58767c05cb7001e77db1bae56cdbe4445.zip
Unwrap ternary operator
Diffstat (limited to 'src/org/traccar/database')
-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)) {