File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed
junit-jupiter-api/src/main/java/org/junit/jupiter/api/io Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change 40
40
*
41
41
* <p>The temporary directory is only created if a field in a test class or a
42
42
* parameter in a lifecycle method or test method is annotated with
43
- * {@code @TempDir}. If the field type or parameter type is neither {@link Path}
44
- * nor {@link File}, if a field is declared as {@code final}, or if the temporary
45
- * directory cannot be created, an {@link ExtensionConfigurationException} or a
46
- * {@link ParameterResolutionException} will be thrown as appropriate. In
47
- * addition, a {@code ParameterResolutionException} will be thrown for a
43
+ * {@code @TempDir}.
44
+ * An {@link ExtensionConfigurationException} or a {@link ParameterResolutionException}
45
+ * will be thrown in one of the following cases:
46
+ *
47
+ * <ul>
48
+ * <li>If the field type or parameter type is neither {@link Path} nor {@link File}.</li>
49
+ * <li>If a field is declared as {@code final}.</li>
50
+ * <li>If the temporary directory cannot be created.</li>
51
+ * <li>If the field type or parameter type is {@code File} and a custom
52
+ * {@link TempDir#factory() factory} is used, which creates a temporary directory that does
53
+ * not belong to the {@link java.nio.file.FileSystems#getDefault() default file system}.</li>
54
+ * </ul>
55
+ *
56
+ * In addition, a {@code ParameterResolutionException} will be thrown for a
48
57
* constructor parameter annotated with {@code @TempDir}.
49
58
*
50
59
* <h2>Scope</h2>
You can’t perform that action at this time.
0 commit comments