RFR: 7457: Unnecessary imports should fail the build

Alex Macdonald aptmac at openjdk.org
Thu May 18 20:50:13 UTC 2023


This PR addresses [JMC-7457](https://bugs.openjdk.org/browse/JMC-7457) [0], in which the build should fail if there are unnecessary imports.

I had a wip branch for this a while ago, but shelved it because it requires a new dependency (maven-checkstyle-plugin) and at the time we were in a dependency freeze ahead of the 8.2.0 release if I recall correctly. Looking back through my assigned issues I think it makes more sense to try again now.

I currently have checkstyle looking for unused, redundant, and wildcard imports.

[0] https://bugs.openjdk.org/browse/JMC-7457

-------------

Commit messages:
 - 7457: Unnecessary imports should fail the build

Changes: https://git.openjdk.org/jmc/pull/484/files
 Webrev: https://webrevs.openjdk.org/?repo=jmc&pr=484&range=00
  Issue: https://bugs.openjdk.org/browse/JMC-7457
  Stats: 172 lines in 17 files changed: 122 ins; 21 del; 29 mod
  Patch: https://git.openjdk.org/jmc/pull/484.diff
  Fetch: git fetch https://git.openjdk.org/jmc.git pull/484/head:pull/484

PR: https://git.openjdk.org/jmc/pull/484


More information about the jmc-dev mailing list