Skip to content

Upgrade Checkstyle to 14.3.0, PMD to 7.28.0, SpotBugs to 4.10.5 - #593

Merged
wborn merged 3 commits into
openhab:mainfrom
holgerfriedrich:pr-full-upgrade
Oct 13, 2026
Merged

wborn merged 3 commits into
openhab:mainfrom
holgerfriedrich:pr-full-upgrade

Conversation

@holgerfriedrich

@holgerfriedrich holgerfriedrich commented Oct 11, 2026 •

Copy link
Copy Markdown
Member

Dependency upgrades:

  • Checkstyle from 12.3.0 to 14.3.0
  • PMD from 7.19.0 to 7.28.0
  • SpotBugs from 4.9.8 to 4.10.5
  • JUnit from 6.0.1 to 6.1.3
  • Mockito from 5.21.0 to 5.24.0
  • commons-io from 2.21.0 to 2.22.0
  • commons-lang3 from 3.20.0 to 3.21.0
  • slf4j from 2.0.17 to 2.0.20
  • logback from 1.5.23 to 1.6.5
  • jsoup from 1.19.1 to 1.23.2
  • maven-core from 3.9.12 to 3.10.0
  • jakarta.xml.bind-api from 4.0.4 to 4.0.5
  • jaxb-runtime from 4.0.6 to 4.0.9
  • plexus-compiler-eclipse from 2.16.1 to 2.17.1
  • Spotless from 3.10.3 to 3.10.4
  • Jetty (tests) from 9.4.50 to 12.1.14
  • Saxon 9.1.0.8 replaced by Saxon-HE 12.10
  • hamcrest-library 3.0 replaced by hamcrest 3.0
  • javax.activation 1.2.0 removed

Code changes:

  • Rewrite MissingJavadocFilterCheck on AbstractCheck, because MissingJavadocTypeCheck can no longer be subclassed
  • Adapt AuthorTagCheck config to the WriteTagCheck API changes
  • Align the runtime tool versions with the compile versions (fixes NoSuchMethodError in user builds)

Users may see new errors:

  • Malformed Javadoc now fails the build (javadoc.parse.rule.error)
  • Missing @author tags are now detected on annotated classes, which were silently skipped before

Note: Parts of this PR were generated by AI.

@holgerfriedrich
holgerfriedrich requested a review from a team as a code owner October 11, 2026 06:47
@holgerfriedrich

Copy link
Copy Markdown
Member Author

I have run this on openhab-core (new findings, PR merged), openhab-addons (PR to be created), webui and distro.

Here is the comparison for core:
grafik
(left: CI, from PR build #9603 which does the changes on core)

(difference can be explained: 11 unused imports were caused by broken javadoc links, 1 fails positive gone through pmd upgrade, one new)

- Checkstyle from 12.3.0 to 14.3.0
- PMD from 7.19.0 to 7.28.0
- SpotBugs from 4.9.8 to 4.10.4

Dependency upgrades:
- JUnit from 6.0.1 to 6.1.3
- Mockito from 5.21.0 to 5.24.0
- commons-io from 2.21.0 to 2.22.0
- commons-lang3 from 3.20.0 to 3.21.0
- slf4j from 2.0.17 to 2.0.20
- logback from 1.5.23 to 1.6.5
- jsoup from 1.19.1 to 1.23.2
- maven-core from 3.9.12 to 3.10.0
- jakarta.xml.bind-api from 4.0.4 to 4.0.5
- jaxb-runtime from 4.0.6 to 4.0.9
- plexus-compiler-eclipse from 2.16.1 to 2.17.1
- Spotless from 3.10.3 to 3.10.4
- Jetty (tests) from 9.4.50 to 12.1.14
- Saxon 9.1.0.8 replaced by Saxon-HE 12.10
- hamcrest-library 3.0 replaced by hamcrest 3.0
- javax.activation 1.2.0 removed

Code changes:
- Rewrite MissingJavadocFilterCheck on AbstractCheck, because
  MissingJavadocTypeCheck can no longer be subclassed
- Adapt AuthorTagCheck config to the WriteTagCheck API changes
- Align the runtime tool versions with the compile versions (fixes
  NoSuchMethodError in user builds)

Users may see new errors:
- Malformed Javadoc now fails the build (javadoc.parse.rule.error)
- Missing @author tags are now detected on annotated classes, which
  were silently skipped before

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>

@wborn wborn 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.

This is an initial AI-assisted review.

The dependency upgrades and required API migrations look good overall. CI is passing on Java 21 and 25, and downstream validation has been reported.

Two non-blocking follow-ups are suggested inline: update the SpotBugs Maven plugin alongside the SpotBugs engine, and mark the rewritten MissingJavadocFilterCheck as file-stateful to match upstream Checkstyle's threading contract.

Comment thread sat-plugin/src/main/java/org/openhab/tools/analysis/tools/SpotBugsChecker.java Outdated
Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
The case group flags were never reset, so after a case without braces,
empty lines in later blocks (also in other files) were missed or
misreported. Reset them per token and add a regression test.

Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
@wborn wborn changed the title Upgrade Checkstyle to 14.3.0, PMD to 7.28.0, SpotBugs to 4.10.4 Upgrade Checkstyle to 14.3.0, PMD to 7.28.0, SpotBugs to 4.10.5 Oct 13, 2026

@wborn wborn 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.

Thanks for all the upgrades! 👍

@wborn
wborn merged commit 1ae40cb into openhab:main Oct 13, 2026
3 checks passed
@wborn wborn added this to the 1.0.0 milestone Oct 13, 2026
@holgerfriedrich
holgerfriedrich deleted the pr-full-upgrade branch October 13, 2026 05:17
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