junit-team/junit5 · error · UnsupportedOperationException

Implement scanForResourcesInClasspathRoot(URI, ResourceFilte

Error message

Implement scanForResourcesInClasspathRoot(URI, ResourceFilter) instead

What it means

Error "Implement scanForResourcesInClasspathRoot(URI, ResourceFilter) instead" thrown in junit-team/junit5.

Source

Thrown at junit-platform-commons/src/main/java/org/junit/platform/commons/support/scanning/ClasspathScanner.java:111

	 * that match the specified {@code resourceFilter} predicate.
	 *
	 * <p>The classpath scanning algorithm searches recursively in subpackages
	 * beginning with the root of the classpath.
	 *
	 * @param root the URI for the classpath root in which to scan; never
	 * {@code null}
	 * @param resourceFilter the resource type filter; never {@code null}
	 * @return a list of all such resources found; never {@code null}
	 * but potentially empty
	 * @deprecated Please implement
	 * {@link #scanForResourcesInClasspathRoot(URI, ResourceFilter)} instead
	 */
	@API(status = DEPRECATED, since = "1.14")
	@Deprecated(since = "1.14", forRemoval = true)
	@SuppressWarnings("removal")
	default List<org.junit.platform.commons.support.Resource> scanForResourcesInClasspathRoot(URI root,
			Predicate<org.junit.platform.commons.support.Resource> resourceFilter) {
		throw new UnsupportedOperationException(
			"Implement scanForResourcesInClasspathRoot(URI, ResourceFilter) instead");
	}

	/**
	 * Find all {@linkplain Resource resources} in the supplied classpath {@code root}
	 * that match the specified {@code resourceFilter} predicate.
	 *
	 * <p>The classpath scanning algorithm searches recursively in subpackages
	 * beginning with the root of the classpath.
	 *
	 * @param basePackageName the name of the base package in which to start
	 * scanning; must not be {@code null} and must be valid in terms of Java
	 * syntax
	 * @param resourceFilter the resource type filter; never {@code null}
	 * @return a list of all such resources found; never {@code null}
	 * but potentially empty
	 * @since 1.14
	 */

View on GitHub (pinned to 956246301e)

When it happens

Trigger: Thrown at junit-platform-commons/src/main/java/org/junit/platform/commons/support/scanning/ClasspathScanner.java:111 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of junit-team/junit5@956246301e (2026-08-04). Data as JSON: /data/errors/2df8813cf9bc943c.json. Report an issue: GitHub.