Commit c27f65e
committed
DevServer: Fix compilation error for getUserKey
I got a compilation error while trying to run run_dev.sh:
% ~/gitiles/tools/run_dev.sh
INFO: Invocation ID: 45647a11-06cb-40c8-a9bd-cae61c5802c0
INFO: Analyzed target //java/com/google/gitiles/dev:dev (0 packages loaded, 0 targets configured).
ERROR: /home/jrosenth/gitiles/java/com/google/gitiles/dev/BUILD:3:13: Building java/com/google/gitiles/dev/liblib.jar (2 source files) failed: (Exit 1): java failed: error executing Javac command (from target //java/com/google/gitiles/dev:lib) external/remotejdk21_linux/bin/java '--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED' '--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED' ... (remaining 19 arguments skipped)
java/com/google/gitiles/dev/DevServer.java:215: error: [ReturnMissingNullable] Method returns a definitely null value but is not annotated @nullable
return null;
^
(see https://errorprone.info/bugpattern/ReturnMissingNullable)
Did you mean 'public @nullable Object getUserKey() {'?
Target //java/com/google/gitiles/dev:dev failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 3.255s, Critical Path: 3.18s
INFO: 3 processes: 2 internal, 1 linux-sandbox.
ERROR: Build did NOT complete successfully
There appears to be no negative consequence to using an empty string
here instead, so change to that.
Change-Id: I86f574c89e351e649f6d9d6cd19582cb560f9b281 parent 3ad1997 commit c27f65e
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
215 | | - | |
| 215 | + | |
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
| |||
0 commit comments