File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
junit-platform-engine/src/main/java/org/junit/platform/engine Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 1818import java .util .Set ;
1919
2020import org .apiguardian .api .API ;
21+ import org .junit .platform .commons .util .Preconditions ;
2122
2223/**
2324 * Mutable descriptor for a test or container that has been discovered by a
@@ -195,10 +196,18 @@ default boolean mayRegisterTests() {
195196 }
196197
197198 /**
198- * Determine if the supplied descriptor or any of its descendants contains
199- * any tests.
199+ * Determine if the supplied descriptor (or any of its descendants)
200+ * {@linkplain TestDescriptor#isTest() is a test} or
201+ * {@linkplain TestDescriptor#mayRegisterTests() may potentially register
202+ * tests dynamically}.
203+ *
204+ * @param testDescriptor the {@code TestDescriptor} to check for tests; never
205+ * {@code null}
206+ * @return {@code true} if the descriptor is a test, contains tests, or may
207+ * later register tests dynamically
200208 */
201209 static boolean containsTests (TestDescriptor testDescriptor ) {
210+ Preconditions .notNull (testDescriptor , "TestDescriptor must not be null" );
202211 return testDescriptor .isTest () || testDescriptor .mayRegisterTests ()
203212 || testDescriptor .getChildren ().stream ().anyMatch (TestDescriptor ::containsTests );
204213 }
You can’t perform that action at this time.
0 commit comments