Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix flow issue #6349 #20255

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

archiecobbs
Copy link
Contributor

Description

Commands enqueued by VaadinSession.access() in general have nothing to do with each other. The only thing they have in common is they share the same VaadinSession (and, by implication, VaadinService).

Therefore, if command №1 invoked UI.setCurrent() and command №2 invokes UI.getCurrent(), command №2 should read null, not the random UI from command №1 that it has nothing to do with.

Fixes #6349

Type of change

  • Bugfix
  • Feature

Checklist

  • I have read the contribution guide: https://vaadin.com/docs/latest/guide/contributing/overview/
  • I have added a description following the guideline.
  • The issue is created in the corresponding repository and I have referenced it.
  • I have added tests to ensure my change is effective and works as intended.
  • New and existing tests are passing locally with my change
    • Except JarContentsManagerTest.copyFilesFromJar_doNotUpdateFileIfContentIsTheSame which has nothing to do with this change.
  • I have performed self-review and corrected misspellings.

@mshabarov mshabarov added the Contribution PRs coming from the community or external to the team label Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Contribution PRs coming from the community or external to the team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Calling VaadinService.access or accessSynchronously leaks UI ThreadLocals
2 participants