Skip to content

Commit 7ea280a

Browse files
committed
Move @Nullable annotation to type declaration
1 parent 553458e commit 7ea280a

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

junit-platform-console/src/main/java/org/junit/platform/console/command/ExecuteTestsCommand.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,8 @@ static class ReportingOptions {
111111
@Option(names = "--fail-fast", description = "Stops test execution after the first failed test.")
112112
private boolean failFast;
113113

114-
@Nullable
115114
@Option(names = "--reports-dir", paramLabel = "DIR", description = "Enable report output into a specified local directory (will be created if it does not exist).")
116-
private Path reportsDir;
115+
private @Nullable Path reportsDir;
117116

118117
Optional<Path> getReportsDir() {
119118
return Optional.ofNullable(reportsDir);

junit-platform-console/src/main/java/org/junit/platform/console/options/TestConsoleOutputOptionsMixin.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,8 @@ public class TestConsoleOutputOptionsMixin {
3232

3333
public static class ConsoleOutputOptions {
3434

35-
@Nullable
3635
@Option(names = "--color-palette", paramLabel = "FILE", description = "Specify a path to a properties file to customize ANSI style of output (not supported by all terminals).")
37-
private Path colorPalette;
36+
private @Nullable Path colorPalette;
3837

3938
@Option(names = "--single-color", description = "Style test output using only text attributes, no color (not supported by all terminals).")
4039
private boolean singleColorPalette;
@@ -48,13 +47,11 @@ public static class ConsoleOutputOptions {
4847
+ "Use one of: ${COMPLETION-CANDIDATES}. Default is detected based on default character encoding.")
4948
private final Theme theme = DEFAULT_THEME;
5049

51-
@Nullable
5250
@Option(names = "--redirect-stdout", paramLabel = "FILE", description = "Redirect test output to stdout to a file.")
53-
private Path stdout;
51+
private @Nullable Path stdout;
5452

55-
@Nullable
5653
@Option(names = "--redirect-stderr", paramLabel = "FILE", description = "Redirect test output to stderr to a file.")
57-
private Path stderr;
54+
private @Nullable Path stderr;
5855

5956
private void applyTo(TestConsoleOutputOptions result) {
6057
result.setColorPalettePath(colorPalette);

junit-platform-console/src/main/java/org/junit/platform/console/options/TestDiscoveryOptionsMixin.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,13 @@ public class TestDiscoveryOptionsMixin {
5555

5656
public static class SelectorOptions {
5757

58-
@Nullable
5958
@Option(names = { "--scan-classpath",
6059
"--scan-class-path" }, converter = ClasspathEntriesConverter.class, paramLabel = "PATH", arity = "0..1", description = "Scan all directories on the classpath or explicit classpath roots. " //
6160
+ "Without arguments, only directories on the system classpath as well as additional classpath " //
6261
+ "entries supplied via -" + CP_OPTION + " (directories and JAR files) are scanned. " //
6362
+ "Explicit classpath roots that are not on the classpath will be silently ignored. " //
6463
+ "This option can be repeated.")
65-
private List<Path> selectedClasspathEntries;
64+
private @Nullable List<Path> selectedClasspathEntries;
6665

6766
@Option(names = "--scan-modules", description = "Scan all resolved modules for test discovery.")
6867
private boolean scanModulepath;

0 commit comments

Comments
 (0)