Skip to content

Resource causes cycles between support, scanning, and util packages #4876

@sbrannen

Description

@sbrannen

Overview

Resource and DefaultResource currently reside in the org.junit.platform.commons.support package.

However, they are used in org.junit.platform.commons.util.ReflectionUtils which is used by org.junit.platform.commons.support.ReflectionSupport, resulting in a support/util package cycle.

They are also used in org.junit.platform.commons.support.scanning.DefaultClasspathScanner which in turn uses types in org.junit.platform.commons.util, resulting in a scanning/support/util package cycle.

I suppose the Resource and DefaultResource types should ideally reside in a separate org.junit.platform.commons.io package.

In any case, we should decide if and how we would like to address this.

As a side note, I don't think DefaultResource needs to be a public type. It could rather be package-private and created via a public static factory method.

Related Issues

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions