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 the synchronisation block in gerritEvent() #382

Merged
merged 1 commit into from Nov 2, 2018

Conversation

Projects
None yet
3 participants
@eryksz
Copy link

commented Sep 13, 2018

In GerritMissedEventsPlaybackManager there is gerritEvent method with a block that synchronizes on the receivedEventCache field. It will get a lock on the referenced object that might be changed in line 322. That means that the lock might not work as expected.

Running SpotBugs on the class reveals this problem.

Eryk Szymanski
Fix the synchronisation block in gerritEvent()
In GerritMissedEventsPlaybackManager there is gerritEvent method
with a block that  synchronizes on the receivedEventCache field.
It will get a lock on the referenced object that might be changed
in line 322. That means that the lock might not work as expected.

Running SpotBugs on the class reveals this problem.
@dpursehouse
Copy link
Contributor

left a comment

LGTM.

@rsandell
Copy link
Member

left a comment

Though I'm a bit scared to touch this class since we've had some threading issues in it before :)

@rsandell rsandell merged commit 34313a6 into jenkinsci:master Nov 2, 2018

1 check passed

continuous-integration/jenkins/pr-merge This commit looks good
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.