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
Overview
ResourceandDefaultResourcecurrently reside in theorg.junit.platform.commons.supportpackage.However, they are used in
org.junit.platform.commons.util.ReflectionUtilswhich is used byorg.junit.platform.commons.support.ReflectionSupport, resulting in asupport/utilpackage cycle.They are also used in
org.junit.platform.commons.support.scanning.DefaultClasspathScannerwhich in turn uses types inorg.junit.platform.commons.util, resulting in ascanning/support/utilpackage cycle.I suppose the
ResourceandDefaultResourcetypes should ideally reside in a separateorg.junit.platform.commons.iopackage.In any case, we should decide if and how we would like to address this.
As a side note, I don't think
DefaultResourceneeds to be apublictype. It could rather be package-private and created via a public static factory method.Related Issues
Resource.of()and makeDefaultResourcepackage-private #4879Resourcetocommons.iopackage and deprecate existing interface #4885MediaTypetojupiter.apipackage and deprecate existing class #4886