Skip to content

Commit c27f65e

Browse files
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: I86f574c89e351e649f6d9d6cd19582cb560f9b28
1 parent 3ad1997 commit c27f65e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

java/com/google/gitiles/dev/DevServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ public Map<String, RepositoryDescription> listRepositories(
212212

213213
@Override
214214
public Object getUserKey() {
215-
return null;
215+
return "";
216216
}
217217

218218
@Override

0 commit comments

Comments
 (0)