[java] Fix #5882: UnconditionalIfStatement false-negative if true/false is not literal#6315
[java] Fix #5882: UnconditionalIfStatement false-negative if true/false is not literal#6315
Conversation
This excludes compile time constants.
adangel
left a comment
There was a problem hiding this comment.
Thanks for the PR.
However, I think, this needs more work.
For one, there seems to be a couple of false positives now in our own code base. I've only looked at the first two, but they seem to be wrongly detected - the boolean local var is not always true or false - it depends:
Warning: PMD Failure: net.sourceforge.pmd.PmdAnalysis:498 Rule:UnconditionalIfStatement Priority:1 Do not use if statements that are always true or always false.
Warning: PMD Failure: net.sourceforge.pmd.cache.internal.AbstractAnalysisCache:73 Rule:UnconditionalIfStatement Priority:1 Do not use if statements that are always true or always false.
Warning: PMD Failure: net.sourceforge.pmd.cache.internal.FileAnalysisCache:125 Rule:UnconditionalIfStatement Priority:1 Do not use if statements that are always true or always false.
Warning: PMD Failure: net.sourceforge.pmd.cpd.GUI:431 Rule:UnconditionalIfStatement Priority:1 Do not use if statements that are always true or always false.
Warning: PMD Failure: net.sourceforge.pmd.internal.util.FileExtensionFilter:38 Rule:UnconditionalIfStatement Priority:1 Do not use if statements that are always true or always false.
Warning: PMD Failure: net.sourceforge.pmd.lang.document.TextFileContent:191 Rule:UnconditionalIfStatement Priority:1 Do not use if statements that are always true or always false.
Warning: PMD Failure: net.sourceforge.pmd.lang.document.TextFileContent:283 Rule:UnconditionalIfStatement Priority:1 Do not use if statements that are always true or always false.
Warning: PMD Failure: net.sourceforge.pmd.lang.rule.RuleSetWriter:285 Rule:UnconditionalIfStatement Priority:1 Do not use if statements that are always true or always false.
Warning: PMD Failure: net.sourceforge.pmd.lang.rule.xpath.internal.SaxonXPathRuleQuery:245 Rule:UnconditionalIfStatement Priority:1 Do not use if statements that are always true or always false.
Warning: PMD Failure: net.sourceforge.pmd.reporting.AbstractAnnotationSuppressor:210 Rule:UnconditionalIfStatement Priority:1 Do not use if statements that are always true or always false.
I'm afraid, it is not as easy - probably that's why the rule was never made smarter than detecting literal booleans. The original issue #5882 also explicitly mentions method return values.
If we want to figure out whether a local variable is always true or false, we need some kind of evaluation of the actual code (looking at data flow maybe) and this is probably not working anymore with a simple XPath (we could look at the initializer, if it contains a boolean operator etc., but that'll become pretty nasty soon). If we also want to consider return values of method calls, we need to evaluate what the method actually does. This sounds a bit more than static analysis - it goes already into analysing the dynamic behavior of the program - which we currently not do at all.
So, I'm not sure, if #5882 is solvable at all. We could pick the most simple use cases (concentrating on final local vars, that are initialized with a literal boolean), but that won't be an overall solution. If we do, we need to create a separate issue.
Tackling the return value of method to evaluate whether it would be always true or false at runtime seems to be out of scope for me.
|
Sorry, I somehow missed the dogfood errors. Is it expected, that these errors do not show up in the local build or is there a way to activate it for local builds? |
No problem. With the dogfood run, we run that latest SNAPSHOT pmd against the PMD sources itself. This is already kind of an regression test on PMD itself - only the rules, we use ourselves are tested (see https://github.com/pmd/build-tools/blob/main/src/main/resources/net/sourceforge/pmd/pmd-dogfood-config.xml) and not all rules. But fixing any problems discovered by the dogfood run helps when we upgrade PMD to the next version - then all new violations have already been fixed and the upgrade is a simple version update (e.g. e9f8146).
In local builds, it doesn't show up that easy. You have basically two options: Use the github build and verify the build result there. (so, no local build) I personally don't run the dogfood builds locally very often. Usually there is no problem and no need, but fixing a false negative can always mean, that PMD now discovers a violation, that it previously didn't. |
|
I've updated this PR now:
This should fix the dogfood issues, where we in PMD ourselves use local boolean vars in if statements, but they are not unconditionally true/false. |
|
Compared to main: (comment created at 2026-01-23 09:15:50+00:00 for 0089f14) |
* Fix pmd#6330 - cannot access Chars attribute from XPath * chore(deps): bump actions/upload-artifact from 5.0.0 to 6.0.0 (pmd#6331) Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5.0.0 to 6.0.0. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@330a01c...b7c566a) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: 6.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump org.mockito:mockito-core from 5.20.0 to 5.21.0 (pmd#6332) Bumps [org.mockito:mockito-core](https://github.com/mockito/mockito) from 5.20.0 to 5.21.0. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](mockito/mockito@v5.20.0...v5.21.0) --- updated-dependencies: - dependency-name: org.mockito:mockito-core dependency-version: 5.21.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump actions/download-artifact from 6.0.0 to 7.0.0 (pmd#6333) Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 6.0.0 to 7.0.0. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](actions/download-artifact@018cc2c...37930b1) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-version: 7.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump ruby/setup-ruby from 1.269.0 to 1.270.0 (pmd#6334) Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.269.0 to 1.270.0. - [Release notes](https://github.com/ruby/setup-ruby/releases) - [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb) - [Commits](ruby/setup-ruby@d697be2...ac793fd) --- updated-dependencies: - dependency-name: ruby/setup-ruby dependency-version: 1.270.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump com.puppycrawl.tools:checkstyle from 12.2.0 to 12.3.0 (pmd#6335) Bumps [com.puppycrawl.tools:checkstyle](https://github.com/checkstyle/checkstyle) from 12.2.0 to 12.3.0. - [Release notes](https://github.com/checkstyle/checkstyle/releases) - [Commits](checkstyle/checkstyle@checkstyle-12.2.0...checkstyle-12.3.0) --- updated-dependencies: - dependency-name: com.puppycrawl.tools:checkstyle dependency-version: 12.3.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump actions/cache from 4.3.0 to 5.0.1 (pmd#6336) Bumps [actions/cache](https://github.com/actions/cache) from 4.3.0 to 5.0.1. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](actions/cache@0057852...9255dc7) --- updated-dependencies: - dependency-name: actions/cache dependency-version: 5.0.1 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump bigdecimal from 3.3.1 to 4.0.0 in /docs (pmd#6337) Bumps [bigdecimal](https://github.com/ruby/bigdecimal) from 3.3.1 to 4.0.0. - [Release notes](https://github.com/ruby/bigdecimal/releases) - [Changelog](https://github.com/ruby/bigdecimal/blob/master/CHANGES.md) - [Commits](ruby/bigdecimal@v3.3.1...v4.0.0) --- updated-dependencies: - dependency-name: bigdecimal dependency-version: 4.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump org.apache.maven.plugins:maven-release-plugin from 3.2.0 to 3.3.1 (pmd#6339) chore(deps): bump org.apache.maven.plugins:maven-release-plugin Bumps [org.apache.maven.plugins:maven-release-plugin](https://github.com/apache/maven-release) from 3.2.0 to 3.3.1. - [Release notes](https://github.com/apache/maven-release/releases) - [Commits](apache/maven-release@maven-release-3.2.0...maven-release-3.3.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-release-plugin dependency-version: 3.3.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump org.apache.maven.plugins:maven-source-plugin from 3.3.1 to 3.4.0 (pmd#6341) chore(deps): bump org.apache.maven.plugins:maven-source-plugin Bumps [org.apache.maven.plugins:maven-source-plugin](https://github.com/apache/maven-source-plugin) from 3.3.1 to 3.4.0. - [Release notes](https://github.com/apache/maven-source-plugin/releases) - [Commits](apache/maven-source-plugin@maven-source-plugin-3.3.1...maven-source-plugin-3.4.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-source-plugin dependency-version: 3.4.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [doc] Update release notes (pmd#5043, pmd#6285) * [doc] Update release notes * [doc] Update release notes (pmd#6230, pmd#6287) * [doc] Update release notes (pmd#6279, pmd#6288) * [java] MissingStaticMethodInNonInstantiatableClass: Test for pmd#6343 * [java] Add suppression for MissingStaticMethodInNonInstantiatableClass * [java] NullAssignment: remove unnecessary check for ctor * [doc] Update release notes (pmd#6276, pmd#6293) * [java] EnumComparison - update test description * [doc] Update release notes (pmd#6291, pmd#6343, pmd#6292) * [doc] Update release notes (pmd#6028, pmd#6294) * Update javadoc apinote * [doc] Update release notes (pmd#6330, pmd#6342) * [java] Fix UnusedLocalVariable false positive in brace-less for-each (pmd#6328) * [java] Update release notes for pmd#6328 * [java] AssignmentInOperand - add test case for chained assignments This was mentioned in https://github.com/pmd/pmd/blob/e50ac051a8106a0cdd60762094c658d76c4daa98/docs/pages/pmd/devdocs/roadmap.md?plain=1#L65 * [doc] Update release notes (pmd#6237, pmd#6295) * [doc] Update release notes (pmd#4282, pmd#6296) * [java] Update release notes (pmd#6299) * [java] OnlyOneReturn - add test case for new property * [doc] Update release notes (pmd#4257, pmd#6309) * [core] Exclude UnnecessaryWarningSuppression for dogfood to succeed * [doc] Update release notes (pmd#6284, pmd#6311) * More exclusions for UnnecessaryWarningSuppression for dogfood to succeed * chore(deps-dev): bump org.apache.logging.log4j:log4j-core from 2.25.2 to 2.25.3 in /pmd-java (pmd#6347) chore(deps-dev): bump org.apache.logging.log4j:log4j-core in /pmd-java Bumps org.apache.logging.log4j:log4j-core from 2.25.2 to 2.25.3. --- updated-dependencies: - dependency-name: org.apache.logging.log4j:log4j-core dependency-version: 2.25.3 dependency-type: direct:development ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fix malformed Javadoc HTML in JspDocStyleTest * [doc] Update release notes (pmd#4910, pmd#6313) * [doc] Update release notes (pmd#5877, pmd#6316) * chore(deps): bump com.github.siom79.japicmp:japicmp-maven-plugin from 0.24.2 to 0.25.1 (pmd#6350) chore(deps): bump com.github.siom79.japicmp:japicmp-maven-plugin Bumps [com.github.siom79.japicmp:japicmp-maven-plugin](https://github.com/siom79/japicmp) from 0.24.2 to 0.25.1. - [Release notes](https://github.com/siom79/japicmp/releases) - [Changelog](https://github.com/siom79/japicmp/blob/master/release.py) - [Commits](siom79/japicmp@japicmp-base-0.24.2...japicmp-base-0.25.1) --- updated-dependencies: - dependency-name: com.github.siom79.japicmp:japicmp-maven-plugin dependency-version: 0.25.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump ruby/setup-ruby from 1.270.0 to 1.275.0 (pmd#6352) Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.270.0 to 1.275.0. - [Release notes](https://github.com/ruby/setup-ruby/releases) - [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb) - [Commits](ruby/setup-ruby@ac793fd...d354de1) --- updated-dependencies: - dependency-name: ruby/setup-ruby dependency-version: 1.275.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump org.ow2.asm:asm from 9.9 to 9.9.1 (pmd#6353) Bumps org.ow2.asm:asm from 9.9 to 9.9.1. --- updated-dependencies: - dependency-name: org.ow2.asm:asm dependency-version: 9.9.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps-dev): bump net.bytebuddy:byte-buddy-agent from 1.18.2 to 1.18.3 (pmd#6354) chore(deps-dev): bump net.bytebuddy:byte-buddy-agent Bumps [net.bytebuddy:byte-buddy-agent](https://github.com/raphw/byte-buddy) from 1.18.2 to 1.18.3. - [Release notes](https://github.com/raphw/byte-buddy/releases) - [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md) - [Commits](raphw/byte-buddy@byte-buddy-1.18.2...byte-buddy-1.18.3) --- updated-dependencies: - dependency-name: net.bytebuddy:byte-buddy-agent dependency-version: 1.18.3 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump org.sonarsource.scanner.maven:sonar-maven-plugin from 5.4.0.6343 to 5.5.0.6356 (pmd#6356) chore(deps): bump org.sonarsource.scanner.maven:sonar-maven-plugin Bumps [org.sonarsource.scanner.maven:sonar-maven-plugin](https://github.com/SonarSource/sonar-scanner-maven) from 5.4.0.6343 to 5.5.0.6356. - [Release notes](https://github.com/SonarSource/sonar-scanner-maven/releases) - [Commits](SonarSource/sonar-scanner-maven@5.4.0.6343...5.5.0.6356) --- updated-dependencies: - dependency-name: org.sonarsource.scanner.maven:sonar-maven-plugin dependency-version: 5.5.0.6356 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump org.apache.commons:commons-text from 1.14.0 to 1.15.0 (pmd#6357) Bumps [org.apache.commons:commons-text](https://github.com/apache/commons-text) from 1.14.0 to 1.15.0. - [Changelog](https://github.com/apache/commons-text/blob/master/RELEASE-NOTES.txt) - [Commits](apache/commons-text@rel/commons-text-1.14.0...rel/commons-text-1.15.0) --- updated-dependencies: - dependency-name: org.apache.commons:commons-text dependency-version: 1.15.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump bigdecimal from 4.0.0 to 4.0.1 in /docs (pmd#6358) Bumps [bigdecimal](https://github.com/ruby/bigdecimal) from 4.0.0 to 4.0.1. - [Release notes](https://github.com/ruby/bigdecimal/releases) - [Changelog](https://github.com/ruby/bigdecimal/blob/master/CHANGES.md) - [Commits](ruby/bigdecimal@v4.0.0...v4.0.1) --- updated-dependencies: - dependency-name: bigdecimal dependency-version: 4.0.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [java] Fix pmd#6234: Parser fails to parse switch expressions in super() constructor calls * [java] Fix issue 4158: False negative in BigIntegerInstantiation * [java] Issue 4158: minor optimization in case value is not constant * Fix invalid Javadoc syntax in VfDocStyleTest * chore: Fix typos * [java] Add testcase for pmd#6234 * [doc] Update release notes (pmd#4158) * Add sca-extra ruleset for Salesforce Apex testing * [doc] Update last_updated for 3rdpartyrulesets.md * Update all-contributors - Add @mdhamed238 as a contributor - Add @gianmarcoschifone as a contributor - Add @styurin as a contributor - Add @sarser2048 as a contributor - Update @lukasgraef as a contributor - Add @Frettman as a contributor - Add @FabioMarangonSMI as a contributor - Add @metalshark as a contributor * Prepare pmd release 7.20.0 * [release] prepare release pmd_releases/7.20.0 * [release] Prepare next development version * chore(deps): bump ruby/setup-ruby from 1.275.0 to 1.277.0 (pmd#6369) Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.275.0 to 1.277.0. - [Release notes](https://github.com/ruby/setup-ruby/releases) - [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb) - [Commits](ruby/setup-ruby@d354de1...8a836ef) --- updated-dependencies: - dependency-name: ruby/setup-ruby dependency-version: 1.277.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps-dev): bump net.bytebuddy:byte-buddy from 1.18.2 to 1.18.3 (pmd#6371) Bumps [net.bytebuddy:byte-buddy](https://github.com/raphw/byte-buddy) from 1.18.2 to 1.18.3. - [Release notes](https://github.com/raphw/byte-buddy/releases) - [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md) - [Commits](raphw/byte-buddy@byte-buddy-1.18.2...byte-buddy-1.18.3) --- updated-dependencies: - dependency-name: net.bytebuddy:byte-buddy dependency-version: 1.18.3 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump org.apache.groovy:groovy from 5.0.2 to 5.0.3 (pmd#6370) Bumps [org.apache.groovy:groovy](https://github.com/apache/groovy) from 5.0.2 to 5.0.3. - [Commits](https://github.com/apache/groovy/commits) --- updated-dependencies: - dependency-name: org.apache.groovy:groovy dependency-version: 5.0.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump org.codehaus.mojo:exec-maven-plugin from 3.6.2 to 3.6.3 (pmd#6372) chore(deps): bump org.codehaus.mojo:exec-maven-plugin Bumps [org.codehaus.mojo:exec-maven-plugin](https://github.com/mojohaus/exec-maven-plugin) from 3.6.2 to 3.6.3. - [Release notes](https://github.com/mojohaus/exec-maven-plugin/releases) - [Commits](mojohaus/exec-maven-plugin@3.6.2...3.6.3) --- updated-dependencies: - dependency-name: org.codehaus.mojo:exec-maven-plugin dependency-version: 3.6.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [java] Add new java language versions 26 and 26-preview * [java] Remove java language version 24-preview * [java] Update implementation for JEP 530: Primitive Types in Patterns... * [java] Move standardized Preview Language Features to Regular Features * [doc] Update release notes (pmd#5871) * [java] Remove unneeded PMD_JAVA_OPTS for preview features Since we use asm for reading classfiles and not reflection, `--enable-preview` is not needed anymore. * Clarify typos config, fix TestNG capitalization * [doc] Add update-last-updated.sh helper script * [doc] Improve update-last-updated.sh to ignore front matter * [doc] Update last_updated info * [doc] Improve update-last-updated.sh to use default version * chore: helper script check-all-contributors.sh This script checks that all contributors of issues and pull requests of the given milestone are mentioned in /.all-contributorsrc. This is useful to run before a release to make sure the contributors list is up to date. * chore(deps): bump ruby/setup-ruby from 1.277.0 to 1.279.0 (pmd#6378) Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.277.0 to 1.279.0. - [Release notes](https://github.com/ruby/setup-ruby/releases) - [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb) - [Commits](ruby/setup-ruby@8a836ef...b90be12) --- updated-dependencies: - dependency-name: ruby/setup-ruby dependency-version: 1.279.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump junit.version from 6.0.1 to 6.0.2 (pmd#6380) Bumps `junit.version` from 6.0.1 to 6.0.2. Updates `org.junit.platform:junit-platform-launcher` from 6.0.1 to 6.0.2 - [Release notes](https://github.com/junit-team/junit-framework/releases) - [Commits](junit-team/junit-framework@r6.0.1...r6.0.2) Updates `org.junit:junit-bom` from 6.0.1 to 6.0.2 - [Release notes](https://github.com/junit-team/junit-framework/releases) - [Commits](junit-team/junit-framework@r6.0.1...r6.0.2) Updates `org.junit.platform:junit-platform-commons` from 6.0.1 to 6.0.2 - [Release notes](https://github.com/junit-team/junit-framework/releases) - [Commits](junit-team/junit-framework@r6.0.1...r6.0.2) --- updated-dependencies: - dependency-name: org.junit.platform:junit-platform-launcher dependency-version: 6.0.2 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.junit:junit-bom dependency-version: 6.0.2 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.junit.platform:junit-platform-commons dependency-version: 6.0.2 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump org.checkerframework:checker-qual from 3.52.1 to 3.53.0 (pmd#6382) chore(deps): bump org.checkerframework:checker-qual Bumps [org.checkerframework:checker-qual](https://github.com/typetools/checker-framework) from 3.52.1 to 3.53.0. - [Release notes](https://github.com/typetools/checker-framework/releases) - [Changelog](https://github.com/typetools/checker-framework/blob/master/docs/CHANGELOG.md) - [Commits](typetools/checker-framework@checker-framework-3.52.1...checker-framework-3.53.0) --- updated-dependencies: - dependency-name: org.checkerframework:checker-qual dependency-version: 3.53.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump org.jsoup:jsoup from 1.21.2 to 1.22.1 (pmd#6381) Bumps [org.jsoup:jsoup](https://github.com/jhy/jsoup) from 1.21.2 to 1.22.1. - [Release notes](https://github.com/jhy/jsoup/releases) - [Changelog](https://github.com/jhy/jsoup/blob/master/CHANGES.md) - [Commits](jhy/jsoup@jsoup-1.21.2...jsoup-1.22.1) --- updated-dependencies: - dependency-name: org.jsoup:jsoup dependency-version: 1.22.1 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [core] Properties: Expose info about collection and enumerations * [doc] RuleDoc: Display possible enumerated values * [core] Properties: update unit tests * [core] Enum properties: supported deprecated values * [core] RuleFactory: display warnings for deprecated properties * [core] Define new enumProperty method, deprecated old * [java] Refactor rule to use new enum property * [java] Refactor rules to use new enum list property * [java] Refactor metric test rules to use new enum property * [doc] Rule doc: test new enum properties * [core] Remove last usages of deprecated enum property * [core] PropertyFactory: Rename enumPropNew -> conventionalEnumProperty * [java] ModifierOrder: Fix rule tests after merge * Update versions (7.19.0 -> 7.20.0) * Update release notes (pmd#6184) * Update versions (7.20.0 -> 7.21.0) * chore(deps): bump uri from 1.0.3 to 1.0.4 in /docs (pmd#6385) Bumps [uri](https://github.com/ruby/uri) from 1.0.3 to 1.0.4. - [Release notes](https://github.com/ruby/uri/releases) - [Commits](ruby/uri@v1.0.3...v1.0.4) --- updated-dependencies: - dependency-name: uri dependency-version: 1.0.4 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [ci] publish-pull-requests: download latest build result * chore(deps): bump scalameta.version from 4.14.2 to 4.14.4 (pmd#6379) * chore(deps): bump scalameta.version from 4.14.2 to 4.14.4 Bumps `scalameta.version` from 4.14.2 to 4.14.4. Updates `org.scalameta:parsers_2.13` from 4.14.2 to 4.14.4 - [Release notes](https://github.com/scalameta/scalameta/releases) - [Commits](scalameta/scalameta@v4.14.2...v4.14.4) Updates `org.scalameta:trees_2.13` from 4.14.2 to 4.14.4 - [Release notes](https://github.com/scalameta/scalameta/releases) - [Commits](scalameta/scalameta@v4.14.2...v4.14.4) Updates `org.scalameta:parsers_2.12` from 4.14.2 to 4.14.4 - [Release notes](https://github.com/scalameta/scalameta/releases) - [Commits](scalameta/scalameta@v4.14.2...v4.14.4) Updates `org.scalameta:trees_2.12` from 4.14.2 to 4.14.4 - [Release notes](https://github.com/scalameta/scalameta/releases) - [Commits](scalameta/scalameta@v4.14.2...v4.14.4) --- updated-dependencies: - dependency-name: org.scalameta:parsers_2.13 dependency-version: 4.14.4 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.scalameta:trees_2.13 dependency-version: 4.14.4 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.scalameta:parsers_2.12 dependency-version: 4.14.4 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.scalameta:trees_2.12 dependency-version: 4.14.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> * [scala] Avoid using internal API --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Andreas Dangel <andreas.dangel@pmd-code.org> * [cli] Improve start script for designer * [cli] Add more opens for reflection This allows to use Azul JDK with JavaFX up to 21. * [cli] Improve start script for designer (windows) * Fix missing license header * [doc] Update release notes (pmd#6290) * Refactoring of pmd start script - determine java_javafx_properties_path once - unnest if statements - always warn about illegal-access (not only for Designer) - improve error messages * Update documentation for designer * Put openjfx on the module path instead of classpath. This avoids warnings like: WARNING: Unsupported JavaFX configuration: classes were loaded from 'unnamed module @222fb444' Note: OpenJFX's lib directory is still on the classpath * Remove HEAPSIZE option Was already deprecated with 6.13.0 and supposed to be removed with PMD 7. * Refactor jre_specific_vm_options, add PMD_ADDITIONAL_JAVA_OPTS * Rename openjfx_module_path to PMD_OPENJFX_MODULE_PATH * Rename classpath to CLASSPATH * Use exit code 2 for invalid script invocations * Refactor windows pmd start script Use subroutines, similar names like in the unix script. * Fix cygpath * Remove JAVA_HOME * Fix script for cygwin * Avoid warnings for native access from javafx.graphics * Avoid warnings for sun.misc.Unsafe from javafx.graphics * Remove JavaFX from classpath for modules * Remove JavaFX from classpath for modules * Only add --enable-native-access when running Designer * Bump pmd-designer from 7.19.1 to 7.19.2 * [java] Fix pmd#6364 - parse error with yield lambda * fix(apex): Treat properties as field-like in FieldDeclarationsShouldBeAtStart (pmd#6349) * [java] Reproduce Issue 3857 * [java] Fix Issue 3857: InsufficientStringBufferDeclaration should consider constant String * [java] simplify expected length calculation * [java] extend testcase to also check non-static final Strings * [java] Fix handling of constants wrapped in another method * [java] Support appending from char cast with constants * [java] Cleanup counting implementation * [java] Add testcase for mixed usage of constants and literals * [java] Fix FPs involving arrays * [java] Fix appending conditional expressions * [java] Add testcase for expected size of null literals * chore(deps): bump com.github.siom79.japicmp:japicmp-maven-plugin from 0.25.1 to 0.25.4 (pmd#6400) chore(deps): bump com.github.siom79.japicmp:japicmp-maven-plugin Bumps [com.github.siom79.japicmp:japicmp-maven-plugin](https://github.com/siom79/japicmp) from 0.25.1 to 0.25.4. - [Release notes](https://github.com/siom79/japicmp/releases) - [Changelog](https://github.com/siom79/japicmp/blob/master/release.py) - [Commits](siom79/japicmp@japicmp-base-0.25.1...japicmp-base-0.25.4) --- updated-dependencies: - dependency-name: com.github.siom79.japicmp:japicmp-maven-plugin dependency-version: 0.25.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump ruby/setup-ruby from 1.279.0 to 1.282.0 (pmd#6399) Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.279.0 to 1.282.0. - [Release notes](https://github.com/ruby/setup-ruby/releases) - [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb) - [Commits](ruby/setup-ruby@b90be12...4fc31e1) --- updated-dependencies: - dependency-name: ruby/setup-ruby dependency-version: 1.282.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump org.sonatype.central:central-publishing-maven-plugin from 0.9.0 to 0.10.0 (pmd#6401) chore(deps): bump org.sonatype.central:central-publishing-maven-plugin Bumps [org.sonatype.central:central-publishing-maven-plugin](https://github.com/sonatype/central-publishing-maven-plugin) from 0.9.0 to 0.10.0. - [Commits](https://github.com/sonatype/central-publishing-maven-plugin/commits) --- updated-dependencies: - dependency-name: org.sonatype.central:central-publishing-maven-plugin dependency-version: 0.10.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump com.google.protobuf:protobuf-java from 4.33.2 to 4.33.4 (pmd#6403) chore(deps): bump com.google.protobuf:protobuf-java Bumps [com.google.protobuf:protobuf-java](https://github.com/protocolbuffers/protobuf) from 4.33.2 to 4.33.4. - [Release notes](https://github.com/protocolbuffers/protobuf/releases) - [Commits](https://github.com/protocolbuffers/protobuf/commits) --- updated-dependencies: - dependency-name: com.google.protobuf:protobuf-java dependency-version: 4.33.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore: Bump maven from 3.9.11 to 3.9.12 (pmd#6375) * Bump PMD from 7.19.0 to 7.20.0 (pmd#6367) * Update PMD from 7.19.0 to 7.20.0 * Remove now unneeded suppressions * [java] New Rule PublicMemberInNonPublicType * [java] PublicMemberInNonPublicType: Fixes from review * [java] PublicMemberInNonPublicType: Ignore interfaces Members of interfaces are implicitly public. * [java] PublicMemberInNonPublicType: Improve rule description and tests * [java] New rule DoNotUseUnsafe * [java] Move DoNotUseUnsafe to errorprone * [java] Rename DoNotUseUnsafe to UnsupportedJdkApiUsage And integrate rule DontImportSun. * [java] Deprecate rule DontImportSun * [java] UnsupportedJdkApiUsage: recognize jdk.internal * [java] UnsupportedJdkApiUsage: verify location of violation * [java] UnsupportedJdkApiUsage: release notes * [java] UnsupportedJdkApiUsage - fix release notes * Fixes from review * chore(deps): bump actions/cache from 5.0.1 to 5.0.2 (pmd#6411) Bumps [actions/cache](https://github.com/actions/cache) from 5.0.1 to 5.0.2. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](actions/cache@9255dc7...8b402f5) --- updated-dependencies: - dependency-name: actions/cache dependency-version: 5.0.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump scalameta.version from 4.14.4 to 4.14.5 (pmd#6412) Bumps `scalameta.version` from 4.14.4 to 4.14.5. Updates `org.scalameta:parsers_2.13` from 4.14.4 to 4.14.5 - [Release notes](https://github.com/scalameta/scalameta/releases) - [Commits](scalameta/scalameta@v4.14.4...v4.14.5) Updates `org.scalameta:trees_2.13` from 4.14.4 to 4.14.5 - [Release notes](https://github.com/scalameta/scalameta/releases) - [Commits](scalameta/scalameta@v4.14.4...v4.14.5) Updates `org.scalameta:parsers_2.12` from 4.14.4 to 4.14.5 - [Release notes](https://github.com/scalameta/scalameta/releases) - [Commits](scalameta/scalameta@v4.14.4...v4.14.5) Updates `org.scalameta:trees_2.12` from 4.14.4 to 4.14.5 - [Release notes](https://github.com/scalameta/scalameta/releases) - [Commits](scalameta/scalameta@v4.14.4...v4.14.5) --- updated-dependencies: - dependency-name: org.scalameta:parsers_2.13 dependency-version: 4.14.5 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.scalameta:trees_2.13 dependency-version: 4.14.5 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.scalameta:parsers_2.12 dependency-version: 4.14.5 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.scalameta:trees_2.12 dependency-version: 4.14.5 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump ruby/setup-ruby from 1.282.0 to 1.285.0 (pmd#6410) Bumps [ruby/setup-ruby](https://github.com/ruby/setup-ruby) from 1.282.0 to 1.285.0. - [Release notes](https://github.com/ruby/setup-ruby/releases) - [Changelog](https://github.com/ruby/setup-ruby/blob/master/release.rb) - [Commits](ruby/setup-ruby@4fc31e1...e69dcf3) --- updated-dependencies: - dependency-name: ruby/setup-ruby dependency-version: 1.285.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps-dev): bump org.codehaus.mojo:versions-maven-plugin from 2.20.1 to 2.21.0 (pmd#6414) chore(deps-dev): bump org.codehaus.mojo:versions-maven-plugin Bumps [org.codehaus.mojo:versions-maven-plugin](https://github.com/mojohaus/versions) from 2.20.1 to 2.21.0. - [Release notes](https://github.com/mojohaus/versions/releases) - [Changelog](https://github.com/mojohaus/versions/blob/master/ReleaseNotes.md) - [Commits](mojohaus/versions@2.20.1...2.21.0) --- updated-dependencies: - dependency-name: org.codehaus.mojo:versions-maven-plugin dependency-version: 2.21.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps-dev): bump net.bytebuddy:byte-buddy-agent from 1.18.3 to 1.18.4 (pmd#6415) chore(deps-dev): bump net.bytebuddy:byte-buddy-agent Bumps [net.bytebuddy:byte-buddy-agent](https://github.com/raphw/byte-buddy) from 1.18.3 to 1.18.4. - [Release notes](https://github.com/raphw/byte-buddy/releases) - [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md) - [Commits](raphw/byte-buddy@byte-buddy-1.18.3...byte-buddy-1.18.4) --- updated-dependencies: - dependency-name: net.bytebuddy:byte-buddy-agent dependency-version: 1.18.4 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps-dev): bump net.bytebuddy:byte-buddy from 1.18.3 to 1.18.4 (pmd#6413) Bumps [net.bytebuddy:byte-buddy](https://github.com/raphw/byte-buddy) from 1.18.3 to 1.18.4. - [Release notes](https://github.com/raphw/byte-buddy/releases) - [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md) - [Commits](raphw/byte-buddy@byte-buddy-1.18.3...byte-buddy-1.18.4) --- updated-dependencies: - dependency-name: net.bytebuddy:byte-buddy dependency-version: 1.18.4 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [apex] Changed ApexCpdLexer to extend AntlrCpdLexer so that "CPD-OFF" & "CPD-ON" work * [apex] Added temporary exclusion to pom.xml due to method still being available via inheritance AFAIK this can and should be removed after the next release * [java] UnconditionalIfStatement: only effectively final local vars * [doc] Update release notes (pmd#5882, pmd#6315) * [java] UnconditionalIfStatement: consider negation * [java] InsufficientStringBufferDeclaration: ignore array access * [java] InsufficientStringBufferDeclaration: correctly consider conditional * [doc] Update release notes (pmd#3857, pmd#6366) * [java] InsufficientStringBufferDeclaration: correctly handle string concat * [apex] FieldDeclarationsShouldBeAtStartRule - clarify properties change * [doc] Update release notes (pmd#6349, pmd#6394) * [apex] FieldDeclarationsShouldBeAtStartRule - clarify properties change * [core] chore: Bump minimum Java version required for building to 21 * chore(deps): bump com.puppycrawl.tools:checkstyle from 12.3.0 to 13.0.0 (pmd#6383) Bumps [com.puppycrawl.tools:checkstyle](https://github.com/checkstyle/checkstyle) from 12.3.0 to 13.0.0. - [Release notes](https://github.com/checkstyle/checkstyle/releases) - [Commits](checkstyle/checkstyle@checkstyle-12.3.0...checkstyle-13.0.0) --- updated-dependencies: - dependency-name: com.puppycrawl.tools:checkstyle dependency-version: 13.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps-dev): bump lodash from 4.17.21 to 4.17.23 (pmd#6419) Bumps [lodash](https://github.com/lodash/lodash) from 4.17.21 to 4.17.23. - [Release notes](https://github.com/lodash/lodash/releases) - [Commits](lodash/lodash@4.17.21...4.17.23) --- updated-dependencies: - dependency-name: lodash dependency-version: 4.17.23 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [ci] publish-snapshot: fix run-coveralls job For some reason, we now need test-compile... * update typos.toml with short howto * Move typos.toml to .ci/files/ * [java] Fix InvalidLogMessageFormat FP when final parameter is Supplier<Throwable> * [java] Fix detection of Supplier<Throwable> for method calls and method references inside lambda * [doc] Update release notes (pmd#3601) * [apex] Replaced temporary exclusion to pom.xml with a delegate passthru to account for code using reflection And added to documentation stating that CPD-ON & CPD-OFF are now supported for Apex * [apex] Restored some imports to ApexCpdLexer.java that are still needed * chore(deps-dev): bump org.assertj:assertj-core from 3.27.6 to 3.27.7 (pmd#6424) Bumps [org.assertj:assertj-core](https://github.com/assertj/assertj) from 3.27.6 to 3.27.7. - [Release notes](https://github.com/assertj/assertj/releases) - [Commits](assertj/assertj@assertj-build-3.27.6...assertj-build-3.27.7) --- updated-dependencies: - dependency-name: org.assertj:assertj-core dependency-version: 3.27.7 dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump actions/checkout from 6.0.1 to 6.0.2 (pmd#6422) Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.1 to 6.0.2. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@8e8c483...de0fac2) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 6.0.2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump actions/setup-java from 5.1.0 to 5.2.0 (pmd#6421) Bumps [actions/setup-java](https://github.com/actions/setup-java) from 5.1.0 to 5.2.0. - [Release notes](https://github.com/actions/setup-java/releases) - [Commits](actions/setup-java@f2beeb2...be666c2) --- updated-dependencies: - dependency-name: actions/setup-java dependency-version: 5.2.0 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump scalameta.version from 4.14.5 to 4.14.6 (pmd#6423) Bumps `scalameta.version` from 4.14.5 to 4.14.6. Updates `org.scalameta:parsers_2.13` from 4.14.5 to 4.14.6 - [Release notes](https://github.com/scalameta/scalameta/releases) - [Commits](scalameta/scalameta@v4.14.5...v4.14.6) Updates `org.scalameta:trees_2.13` from 4.14.5 to 4.14.6 - [Release notes](https://github.com/scalameta/scalameta/releases) - [Commits](scalameta/scalameta@v4.14.5...v4.14.6) Updates `org.scalameta:parsers_2.12` from 4.14.5 to 4.14.6 - [Release notes](https://github.com/scalameta/scalameta/releases) - [Commits](scalameta/scalameta@v4.14.5...v4.14.6) Updates `org.scalameta:trees_2.12` from 4.14.5 to 4.14.6 - [Release notes](https://github.com/scalameta/scalameta/releases) - [Commits](scalameta/scalameta@v4.14.5...v4.14.6) --- updated-dependencies: - dependency-name: org.scalameta:parsers_2.13 dependency-version: 4.14.6 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.scalameta:trees_2.13 dependency-version: 4.14.6 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.scalameta:parsers_2.12 dependency-version: 4.14.6 dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.scalameta:trees_2.12 dependency-version: 4.14.6 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump org.apache.groovy:groovy from 5.0.3 to 5.0.4 (pmd#6425) Bumps [org.apache.groovy:groovy](https://github.com/apache/groovy) from 5.0.3 to 5.0.4. - [Commits](https://github.com/apache/groovy/commits) --- updated-dependencies: - dependency-name: org.apache.groovy:groovy dependency-version: 5.0.4 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [ci] chore: run extensive integration tests under linux only (pmd#6428) [ci] chore: run extensive integrations under linux only These tests were supposed to be run only on the linux runners, but other runners have all the java version installed as well and ran these tests as well. This was not intended and lengthens the build time. * Update release notes * [apex] Restore binary compat for ApexCpdLexer The #tokenize() method has been moved to the super class. This is not a problem. But the super class defines the method as final, which means it can't be overridden. For now, we simply delegate to the new version of the apex lexer. With PMD 8, we can merge the two implementations again. * [doc] Update release notes (pmd#6417) * [doc] Update release notes (pmd#6364, pmd#6430) * [java] PublicMembersInNonPublicType: Update rule description * [doc] Update release notes (pmd#6231) * chore: update javadoc internal API tags Add an apiNote * chore: update internal API notes * chore: @APinote -> @internalapi * [doc] ADR 3: Clarify javadoc tags Add details on how to use javadoc tags for deprecated, experimental and internal APIs. * chore: add full description to internalApi javadoc * chore: update javadoc experimental tags Add the since version separately. * chore: update javadoc deprecated tags All deprecated infos should contain the version, since the element has been deprecated. * [doc] chore: add keywords for auxclasspath in Java documentation (pmd#6429) Refs pmd#5064 * Prepare pmd release 7.21.0 * [release] prepare release pmd_releases/7.21.0 * 37163: Upgraded CPD to 7.21.0. --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Clément Fournier <clement.fournier@tu-dresden.de> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Andreas Dangel <andreas.dangel@pmd-code.org> Co-authored-by: Mohamed Hamed <mdhamed.dev@gmail.com> Co-authored-by: gianmarco <gianmarco.schifone02@gmail.com> Co-authored-by: Mohamed Hamed <79021260+mdhamed238@users.noreply.github.com> Co-authored-by: Lukas Gräf <lukas-graef@web.de> Co-authored-by: Zbynek Konecny <zbynek@geogebra.org> Co-authored-by: Beech Horn <beechhorn@gmail.com> Co-authored-by: Thomas Leplus <thomasleplus@users.noreply.github.com> Co-authored-by: Jade Petraglia <jpetraglia@inspirato.com>
Describe the PR
Look for locally declared boolean variables as single if condition.
Related issues
Ready?
./mvnw clean verifypasses (checked automatically by github actions)