Remove commons-io by replacing its limited usage in Checker - #2
Open
mraselimo wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
While performing static analysis on this project, we noticed that the dependency
commons-iois usedonly 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-ioto be removed frompom.xml.Benefits of this change include:
The replacement is functionally equivalent and does not alter the behavior of the affected code.
Additionally, this pull request adds
javax.annotation-apiexplicitly so the existing@PostConstructusage 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
IOUtils.readLines(...)with standard JavaBufferedReaderhandlingIOUtils.closeQuietly(...)withtry-with-resourcescommons-iofrompom.xmljavax.annotation-apito preserve compilation on modern JDKsVerification
mvn -Dmaven.repo.local=/tmp/m2-language-tools-bg testBUILD SUCCESS