File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
junit-platform-engine/src/main/java/org/junit/platform/engine/reporting
junit-platform-launcher/src/main/java/org/junit/platform/launcher/core Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change 3030public interface OutputDirectoryProvider {
3131
3232 /**
33- * {@return the root directory for all output files}
33+ * {@return the root directory for all output files; never {@code null} }
3434 */
3535 Path getRootDirectory ();
3636
3737 /**
3838 * Create an output directory for the supplied test descriptor.
3939 *
4040 * @param testDescriptor the test descriptor for which to create an output
41- * directory
41+ * directory; never {@code null}
4242 * @return the output directory
4343 * @throws IOException if the output directory could not be created
4444 */
Original file line number Diff line number Diff line change 1818import java .util .function .Supplier ;
1919import java .util .regex .Pattern ;
2020
21+ import org .junit .platform .commons .util .Preconditions ;
2122import org .junit .platform .engine .TestDescriptor ;
2223import org .junit .platform .engine .UniqueId .Segment ;
2324import org .junit .platform .engine .reporting .OutputDirectoryProvider ;
@@ -42,6 +43,8 @@ class HierarchicalOutputDirectoryProvider implements OutputDirectoryProvider {
4243
4344 @ Override
4445 public Path createOutputDirectory (TestDescriptor testDescriptor ) throws IOException {
46+ Preconditions .notNull (testDescriptor , "testDescriptor must not be null" );
47+
4548 List <Segment > segments = testDescriptor .getUniqueId ().getSegments ();
4649 Path relativePath = segments .stream () //
4750 .skip (1 ) //
You can’t perform that action at this time.
0 commit comments