Skip to content

Commit f8f1e3d

Browse files
committed
Annotate nullability in org.junit.platform.engine.reporting
1 parent fe3316c commit f8f1e3d

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

junit-platform-engine/src/main/java/org/junit/platform/engine/reporting/FileEntry.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import java.util.Optional;
1818

1919
import org.apiguardian.api.API;
20+
import org.jspecify.annotations.Nullable;
2021
import org.junit.platform.commons.util.Preconditions;
2122
import org.junit.platform.commons.util.ToStringBuilder;
2223

@@ -38,15 +39,17 @@ public final class FileEntry {
3839
* @param mediaType the media type of the path to publish; may be
3940
* {@code null}
4041
*/
41-
public static FileEntry from(Path path, String mediaType) {
42+
public static FileEntry from(Path path, @Nullable String mediaType) {
4243
return new FileEntry(path, mediaType);
4344
}
4445

4546
private final LocalDateTime timestamp = LocalDateTime.now();
4647
private final Path path;
48+
49+
@Nullable
4750
private final String mediaType;
4851

49-
private FileEntry(Path path, String mediaType) {
52+
private FileEntry(Path path, @Nullable String mediaType) {
5053
this.path = Preconditions.notNull(path, "path must not be null");
5154
this.mediaType = mediaType;
5255
}

junit-platform-engine/src/main/java/org/junit/platform/engine/reporting/package-info.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@
33
* listeners.
44
*/
55

6+
@NullMarked
67
package org.junit.platform.engine.reporting;
8+
9+
import org.jspecify.annotations.NullMarked;

0 commit comments

Comments
 (0)