GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [java] Fix #5880: False Negatives in DoubleCheckedLocking by lukasgraef · Pull Request #6031 · pmd/pmd

Conversation

@lukasgraef

@lukasgraef lukasgraef commented Sep 2, 2025

Copy link
Copy Markdown
Member

Describe the PR

This PR fixes both False Negatives described in #5880

Related issues

  • Fixes [java] DoubleCheckedLocking is not detected if more than 1 assignment or more than 2 if statements #5880

Ready?

  • Added unit tests for fixed bug/feature
  • Passing all unit tests
  • Complete build ./mvnw clean verify passes (checked automatically by github actions)
  • Added (in-code) documentation (if needed)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
lukasgraef added 2 commits September 2, 2025 14:59
@lukasgraef
[java] Fix pmd#5880: DoubleCheckedLocking FN with more than one assig…
efe69e4
…nment
@lukasgraef
[java] Fix pmd#5880: DoubleCheckedLocking FN with more than two if st…
a32b68d
…atements
lukasgraef
lukasgraef commented Sep 2, 2025
View reviewed changes
Comment thread ...est/resources/net/sourceforge/pmd/lang/java/rule/multithreading/xml/DoubleCheckedLocking.xml Resolved

Uh oh!

There was an error while loading. Please reload this page.

@pmd-actions-helper

pmd-actions-helper Bot commented Sep 2, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Documentation Preview

Compared to main:
This changeset changes 0 violations,
introduces 2 new violations, 0 new errors and 0 new configuration errors,
removes 0 violations, 25 errors and 8 configuration errors.

Regression Tester Report

(comment created at 2025-09-02 20:54:04+00:00 for a5836e5)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@lukasgraef
lukasgraef marked this pull request as draft September 2, 2025 15:10
@lukasgraef
lukasgraef force-pushed the issue5880 branch from 745c02e to cb3a626 Compare September 2, 2025 20:08
@lukasgraef
pmd#5880: Findings from regression tester
a5836e5
@lukasgraef
lukasgraef force-pushed the issue5880 branch from cb3a626 to a5836e5 Compare September 2, 2025 20:37
@lukasgraef
lukasgraef marked this pull request as ready for review September 2, 2025 20:55
adangel
adangel approved these changes Sep 19, 2025
View reviewed changes

@adangel adangel left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thanks!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@adangel adangel added this to the 7.18.0 milestone Sep 19, 2025
@adangel
adangel merged commit 5b3a083 into pmd:main Sep 19, 2025
adangel added a commit that referenced this pull request Sep 19, 2025
@adangel
[doc] Update release notes (#5880, #6031)
44dd143
adangel added a commit to adangel/pmd that referenced this pull request Sep 19, 2025
@adangel
[java] Fix pmd#5880: False Negatives in DoubleCheckedLocking (pmd#6031)
ad71cbe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@adangel adangel adangel approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

7.18.0

Development

Successfully merging this pull request may close these issues.

[java] DoubleCheckedLocking is not detected if more than 1 assignment or more than 2 if statements

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@lukasgraef @adangel
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.