VaadinSession.getPushId calls checkHasLock although not needed.

Open Beginner friendly
#25,233 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
72/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
java
Domain
backend

Research direction

Start at VaadinSession.getPushId and inspect the lock check relative to the PushId field initialized during VaadinSession creation. Reproduce the reported case with a new thread that sets the VaadinSession and calls getPushId without access or accessSynchronously. Done means the getter returns the field value independently of the lock state.

Written by the indexing model from the issue text.

Description

investigation
Description of the bug

The PushId-Field is initialized inside while a new VaadinSession is being created, and the getPushId()-Method only returns this final Field. This makes concurrent modifications impossible by default and only increases the Complexity to access this field / use the method.

Expected behavior

The getter should always return the Field's value, so it can be used independently of the Lock's State!

Minimal reproducible example

Start a new Thread set the VaadinSession and try getting the PushId without access or accessSynchronously.

Versions
  • Vaadin / Flow version: 24.10.8 & 25.2.6
  • Java version: 21
  • OS version: Any
Dominant language
Java
Stars
754
Forks
219
Avg merge
21h 28m
Merged PRs (30d)
420

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from vaadin/flow

All issues in vaadin/flow

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.