java-design-patterns
java-design-patterns copied to clipboard
fix: a concurrent problem for lazy initialization
Pull request title
- use atomic operation
ConcurrentMap.computeIfAbsentinstead of double-check-lock for lazy initialization
Pull request description
- fix the concurrent problem
Hi! We are working on a tool that shows the "execution difference" of a patch. In other words, it reports if there has been a change in value of fields, local variables, or return. We tried to run our tool against the patch in this PR and got the following report (please open it a new tab to view it clearly):

It would really help our research if the contributors could answer few of our questions.
- Does the execution difference assist you in investigating the cause of the build failure?
- Do you think it adds some more useful information that is not provided by the current state-of-the-art tools like Codecov, etc?
@light0x00 can you describe the problem that the pull request is fixing? I don't see any failures in the master branch tests.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Closed due to inactivity