Repository navigation
refactor: drop commons-io dependency - #5328
Merged
daniel-kmiecik merged 1 commit intoSep 23, 2026
Merged
Conversation
Signed-off-by: Vasily Pelikh <vasily.pelikh@gmail.com>
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
No unresolved review issues were identified.
Review effort: Lite
Findings: None
What changed in this PR
Removes the commons-io dependency and replaces its test utilities with standard JDK APIs.
Changes:
- Removed Maven and Gradle dependency declarations.
- Replaced file and stream utilities with Java NIO and standard APIs.
- Improved case-insensitive output-format checks.
| File | Description |
|---|---|
pom.xml |
Removes dependency management entries. |
modules/swagger-rest/src/test/java/io/swagger/v3/jaxrs2/annotations/AbstractAnnotationTest.java |
Replaces resource reading. |
modules/swagger-rest/pom.xml |
Removes the test dependency. |
modules/swagger-maven-plugin/src/test/java/io/swagger/v3/plugin/maven/ASwaggerMavenIntegrationTest.java |
Replaces file reading and format checks. |
modules/swagger-gradle-plugin/build.gradle |
Removes the test dependency. |
modules/swagger-core/src/test/java/io/swagger/v3/core/util/TestUtils.java |
Replaces stream reading. |
modules/swagger-core/src/test/java/io/swagger/v3/core/util/ResourceUtils.java |
Replaces resource reading. |
modules/swagger-core/src/test/java/io/swagger/v3/core/deserialization/JsonDeserializationTest.java |
Replaces file reading. |
modules/swagger-core/pom.xml |
Removes the test dependency. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Pull Request
Thank you for contributing to swagger-core!
Please fill out the following information to help us review your PR efficiently.
Description
This PR removes the
commons-iodependency from swagger-core and replaces its usages with standard JDK APIs and small in-house utilities. It eliminates an unnecessary dependency, reducing the dependency footprint and supply-chain surface for all consumers of swagger-core.The change is a refactor and preserves existing behavior. Replaced classes include
FileUtilsandIOUtilsutilities.Fixes:
Type of Change
Checklist
Screenshots / Additional Context
commons-iofrompom.xml(dependency declaration and any allowed external dependency lists).org.apache.commons.iowith JDK 17 equivalents.commons-io:2.18.0for null, empty, and typical I/O cases.