Skip to content

Handle race condition when insert id to list#437

Merged
goneall merged 2 commits into
spdx:masterfrom
bact:fix/stored-typed-item-putifabsent-race
Jul 19, 2026
Merged

Handle race condition when insert id to list#437
goneall merged 2 commits into
spdx:masterfrom
bact:fix/stored-typed-item-putifabsent-race

Conversation

@bact

@bact bact commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator

Replace the multi-step check-and-create sequence with a single, uninterruptible call to ConcurrentHashMap.computeIfAbsent (follows usage elsewhere in this project).

Fixes SpotBugs RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED from #434

bact added 2 commits July 17, 2026 02:44
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>

@goneall goneall left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@goneall
goneall merged commit ecc790b into spdx:master Jul 19, 2026
1 check passed
@bact
bact deleted the fix/stored-typed-item-putifabsent-race branch July 19, 2026 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants