only: get rid of redundant check for `auto` port - it should never be `auto` here

This commit is contained in:
kifir 2024-08-12 18:02:25 +03:00 committed by rusefillc
parent 0f0a433102
commit bde60cb578
1 changed files with 4 additions and 8 deletions

View File

@ -197,15 +197,11 @@ public class ProgramSelector {
final UpdateOperationCallbacks callbacks
) {
return waitForPredicate(
"Waiting for ECU to reboot to OpenBlt...",
String.format("Waiting for ECU on port %s to reboot to OpenBlt...", ecuPort),
() -> {
if (PortDetector.AUTO.equals(ecuPort)) {
return true;
} else {
final Set<String> currentPorts = LinkManager.getCommPorts();
log.info("currentPorts: [" + String.join(",", currentPorts) + "]");
return !LinkManager.getCommPorts().contains(ecuPort);
}
final Set<String> currentPorts = LinkManager.getCommPorts();
log.info("currentPorts: [" + String.join(",", currentPorts) + "]");
return !LinkManager.getCommPorts().contains(ecuPort);
},
callbacks
);