Skip to content

Commit

Permalink
fix: Ignore CancellationException for running UI update tasks (#13708) (
Browse files Browse the repository at this point in the history
#13766)

Ignore CancellationException if the task is cancelled in the meantime.
Authored-by: @HawkSK
Fixes #13610

Co-authored-by: @mshabarov

Co-authored-by: Mikhail Shabarov <[email protected]>
  • Loading branch information
vaadin-bot and mshabarov authored May 16, 2022
1 parent 0689490 commit da2c605
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import java.util.Optional;
import java.util.ServiceLoader;
import java.util.Set;
import java.util.concurrent.CancellationException;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.Future;
Expand Down Expand Up @@ -2063,6 +2064,10 @@ public void runPendingAccessTasks(VaadinSession session) {
try {
pendingAccess.get();

} catch (CancellationException ignored) { // NOSONAR
// Ignore canceled UI access tasks exceptions and don't
// let it to be processed by the error handler and shown
// on the UI
} catch (Exception exception) {
pendingAccess.handleError(exception);
}
Expand Down

0 comments on commit da2c605

Please sign in to comment.