Skip to content

ReentrantLock Usage Needed in PhOnce.java for Thread SafetyΒ #4909

@0pdd

Description

@0pdd

The puzzle 4884-bded9a21 from #4884 has to be resolved:

* @todo #4884:30min Use ReentrantLock instead of synchronized block in the constructor.
* This will allow to avoid blocking the whole object while fetching the wrapped one.
* Moreover, using 'syznchronized' is forbidden by qulice.
* Don't forget to remove the suppression of PMD.AvoidSynchronizedStatement in
* the constructor after that.

The puzzle was created by Yegor Bugayenko on 01-Mar-26.

Estimate: 30 minutes, role: DEV.

If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions