Overview
As I mentioned in #4876, org.junit.platform.commons.support.Resource causes cycles between the support, scanning, and util packages in junit-platform-commons.
Since it's rather likely that we will have the need to support additional I/O types at the platform level in the future, it's probably best that we relocate Resource to a new org.junit.platform.commons.io package and deprecate the existing interface.
Specifically, I am proposing the following.
- Introduce
org.junit.platform.commons.io.Resource as a copy of org.junit.platform.commons.support.Resource.
- Have
org.junit.platform.commons.support.Resource extend org.junit.platform.commons.io.Resource.
- Deprecate
org.junit.platform.commons.support.Resource for removal.
- Update all APIs that reference
org.junit.platform.commons.support.Resource to reference org.junit.platform.commons.io.Resource instead.
Since org.junit.platform.commons.support.Resource is a relatively new API, we assume that it is not actively used by many projects yet. In light of that, we are considering making these breaking changes for JUnit 6.0.
However, we hope that affected users will only need to change their imports from org.junit.platform.commons.support.Resource to org.junit.platform.commons.io.Resource to address any issues.
Related Issues
Overview
As I mentioned in #4876,
org.junit.platform.commons.support.Resourcecauses cycles between thesupport,scanning, andutilpackages injunit-platform-commons.Since it's rather likely that we will have the need to support additional I/O types at the platform level in the future, it's probably best that we relocate
Resourceto a neworg.junit.platform.commons.iopackage and deprecate the existing interface.Specifically, I am proposing the following.
org.junit.platform.commons.io.Resourceas a copy oforg.junit.platform.commons.support.Resource.org.junit.platform.commons.support.Resourceextendorg.junit.platform.commons.io.Resource.org.junit.platform.commons.support.Resourcefor removal.org.junit.platform.commons.support.Resourceto referenceorg.junit.platform.commons.io.Resourceinstead.Since
org.junit.platform.commons.support.Resourceis a relatively new API, we assume that it is not actively used by many projects yet. In light of that, we are considering making these breaking changes for JUnit 6.0.However, we hope that affected users will only need to change their imports from
org.junit.platform.commons.support.Resourcetoorg.junit.platform.commons.io.Resourceto address any issues.Related Issues