Skip to content

Relocate Resource to commons.io package and deprecate existing interface #4885

@sbrannen

Description

@sbrannen

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.

  1. Introduce org.junit.platform.commons.io.Resource as a copy of org.junit.platform.commons.support.Resource.
  2. Have org.junit.platform.commons.support.Resource extend org.junit.platform.commons.io.Resource.
  3. Deprecate org.junit.platform.commons.support.Resource for removal.
  4. 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

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions