Merge branch 'stable-3.1'

* stable-3.1:
  Bump Bazel version to 3.5.0
  Fix NullPointerExceptions

Change-Id: I73edc6d27076f241d49bbd169836a16216886783
diff --git a/.bazelversion b/.bazelversion
index 47b322c..1545d96 100644
--- a/.bazelversion
+++ b/.bazelversion
@@ -1 +1 @@
-3.4.1
+3.5.0
diff --git a/src/main/java/com/googlesource/gerrit/plugins/messageoftheday/GetMessage.java b/src/main/java/com/googlesource/gerrit/plugins/messageoftheday/GetMessage.java
index 85cb1b1..255bb90 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/messageoftheday/GetMessage.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/messageoftheday/GetMessage.java
@@ -74,14 +74,14 @@
     motd.id = cfg.getString(SECTION_MESSAGE, null, KEY_ID);
     if (Strings.isNullOrEmpty(motd.id)) {
       log.warn("id not defined, no message will be shown");
-      return null;
+      return Response.none();
     }
 
     try {
       motd.expiresAt = DATE_FORMAT.parse(cfg.getString(SECTION_MESSAGE, null, KEY_EXPIRES_AT));
     } catch (ParseException | NullPointerException e) {
       log.warn("expiresAt not defined, no message will be shown");
-      return null;
+      return Response.none();
     }
 
     try {
@@ -90,7 +90,7 @@
       log.warn(
           String.format(
               "No HTML-file was found for message %s, no message will be shown", motd.id));
-      return null;
+      return Response.none();
     }
 
     try {
@@ -101,7 +101,7 @@
     }
 
     if (motd.startsAt.compareTo(new Date()) > 0 || motd.expiresAt.compareTo(new Date()) < 0) {
-      return null;
+      return Response.none();
     }
 
     motd.redisplay = getRedisplay();