From 39be24a58767c05cb7001e77db1bae56cdbe4445 Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Fri, 20 Oct 2017 14:42:03 +0500 Subject: Unwrap ternary operator --- src/org/traccar/database/CommandsManager.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/org') 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 = 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)) { -- cgit v1.2.3