Skip to content

Conversation

marcphilipp
Copy link
Member

@marcphilipp marcphilipp commented Aug 29, 2025

This PR introduces a new Resource interface in the new org.junit.platform.commons.io package.

The old interface extends the new one so it can be used in places that now consume the new interface.

The resource finding/scanning methods in ReflectionSupport are now deprecated in favor of the new ones in the ResourceSupport class.

Since Predicate<...io.Resource> and Predicate<...support.Resource> have the same erasure, this PR introduces ResourceFilter (mimicking the existing ClassFilter) in order to be able to overload methods such as EngineDiscoveryRequestResolver.Builder.addResourceContainerSelectorResolver.

Resolves #4885.


I hereby agree to the terms of the JUnit Contributor License Agreement.


Definition of Done

@marcphilipp marcphilipp changed the title Introduce org.junit.platform.commons.io.Resource Relocate Resource to org.junit.platform.commons.io package Sep 7, 2025
@marcphilipp marcphilipp force-pushed the marc/4876-resource-package branch from 4796abc to 9ec1c55 Compare September 8, 2025 07:33
@marcphilipp marcphilipp force-pushed the marc/4876-resource-package branch 5 times, most recently from b0c6cc5 to 759a037 Compare September 9, 2025 07:15
Copy link
Member

@sormuras sormuras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks okay - and it's always good to see "ignore" directives vanish from ArchUnit tests.

@marcphilipp marcphilipp force-pushed the marc/4876-resource-package branch from 759a037 to ebc6a85 Compare September 12, 2025 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Relocate Resource to commons.io package and deprecate existing interface
2 participants