Skip to content

Remove commons-io by replacing its limited usage in Checker - #2

Open
mraselimo wants to merge 1 commit into
Glamdring:masterfrom
mraselimo:remove-commons-io
Open

Remove commons-io by replacing its limited usage in Checker#2
mraselimo wants to merge 1 commit into
Glamdring:masterfrom
mraselimo:remove-commons-io

Conversation

@mraselimo

Copy link
Copy Markdown

While performing static analysis on this project, we noticed that the dependency commons-io is used
only very sparsely, in this case only in a small number of locations within Checker.
This pull request replaces that usage with equivalent functionality from the Java standard library,
allowing commons-io to be removed from pom.xml.

Benefits of this change include:

  • Reduced dependency footprint
  • Lower maintenance and update overhead
  • Slightly simplified build configuration
  • Reduced transitive dependency surface

The replacement is functionally equivalent and does not alter the behavior of the affected code.

Additionally, this pull request adds javax.annotation-api explicitly so the existing @PostConstruct
usage continues to compile on modern JDKs where those annotations are no longer bundled.

Please let us know if there are any concerns regarding compatibility or future plans that would justify
retaining commons-io.

Change Summary

  • Replaced IOUtils.readLines(...) with standard Java BufferedReader handling
  • Replaced IOUtils.closeQuietly(...) with try-with-resources
  • Removed commons-io from pom.xml
  • Added javax.annotation-api to preserve compilation on modern JDKs

Verification

  • Ran mvn -Dmaven.repo.local=/tmp/m2-language-tools-bg test
  • Result: BUILD SUCCESS
  • Tests run: 2, Failures: 0, Errors: 0, Skipped: 0

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.

1 participant