Skip to content

Conversation

@mpkorstanje
Copy link
Contributor

@mpkorstanje mpkorstanje commented Jan 27, 2026

Adds the array and list based equivalents of the singular selectClasspathResource.

Additionally:

  1. Replace List.of with Arrays.asList to prevent premature NPEs instead of failing preconditions.
  2. Add and use Preconditions.containsNoBlankElements to catch collections with blank strings.
  3. Add missing preconditions

Closes: #4873


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


Definition of Done

@testlens-app
Copy link

testlens-app bot commented Jan 27, 2026

✅ All tests passed ✅

🏷️ Commit: b40eca6
▶️ Tests: 25986 executed
⚪️ Checks: 15/15 completed


Learn more about TestLens at testlens.app.

@mpkorstanje mpkorstanje force-pushed the rien/add-more-discovery-selectors branch 6 times, most recently from 24ca76c to c0d9fd3 Compare January 27, 2026 22:03
@mpkorstanje mpkorstanje changed the title Add selectClasspathResources(String...) to discovery selectors Add selectClasspathResourcesByName(String...) to discovery selectors Jan 28, 2026
@mpkorstanje mpkorstanje changed the title Add selectClasspathResourcesByName(String...) to discovery selectors Add selectClasspathResources(String...) to discovery selectors Jan 28, 2026
@mpkorstanje mpkorstanje marked this pull request as ready for review January 28, 2026 16:02
Adds the array and list based equivalent of the singular
`selectClasspathResource`.

Additionally:
1. Replace `List.of` with `Arrays.asList` to prevent premature NPEs
   instead of failing preconditions.
2. Add and use `Preconditions.containsNoBlankElements` to catch
   collections with blank strings.
@mpkorstanje mpkorstanje force-pushed the rien/add-more-discovery-selectors branch from c18c014 to b40eca6 Compare January 28, 2026 16:06
@mpkorstanje mpkorstanje requested a review from sbrannen January 30, 2026 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Introduce selectClasspathResources(Set) in DiscoverySelectors and deprecate selectClasspathResource(Set)

3 participants