Merge branch 'stable-3.4' into stable-3.5

* stable-3.4:
  Format correctly Build file with buildifier
  Consume events-broker from source
  Skip web sessions replay for persisted cache

Change-Id: Id8baa04bb6b67e2d8c7b4df9b39e8f753b110946
diff --git a/src/main/java/com/googlesource/gerrit/plugins/websession/broker/BrokerBasedWebSessionCache.java b/src/main/java/com/googlesource/gerrit/plugins/websession/broker/BrokerBasedWebSessionCache.java
index cbc11bc..dae6342 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/websession/broker/BrokerBasedWebSessionCache.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/websession/broker/BrokerBasedWebSessionCache.java
@@ -97,7 +97,7 @@
 
   protected void processMessage(Event message) {
     if (!WebSessionEvent.TYPE.equals(message.getType())) {
-      logger.atWarning().log("Skipping web session message of unknown type:{}", message.getType());
+      logger.atWarning().log("Skipping web session message of unknown type: %s", message.getType());
       return;
     }
 
@@ -116,7 +116,7 @@
           }
 
         } catch (IOException | ClassNotFoundException e) {
-          logger.atSevere().withCause(e).log("Malformed event '%s': [Exception: %s]", message);
+          logger.atSevere().withCause(e).log("Malformed event '%s'", message);
         }
         break;
       case REMOVE:
@@ -126,7 +126,7 @@
         break;
       default:
         logger.atWarning().log(
-            "Skipping web session message of unknown operation type:{}", event.operation);
+            "Skipping web session message of unknown operation type: %s", event.operation);
         break;
     }
   }
@@ -293,7 +293,7 @@
             MoreExecutors.directExecutor());
       } catch (IOException e) {
         logger.atSevere().withCause(e).log(
-            "Cannot serialize event for account id '%s': [Exception: %s]", value.getAccountId());
+            "Cannot serialize event for account id '%s'", value.getAccountId());
       }
     }
   }
diff --git a/src/test/java/com/googlesource/gerrit/plugins/websession/broker/BrokerBasedWebSessionCacheTest.java b/src/test/java/com/googlesource/gerrit/plugins/websession/broker/BrokerBasedWebSessionCacheTest.java
index 3ad7ae4..ba7175d 100644
--- a/src/test/java/com/googlesource/gerrit/plugins/websession/broker/BrokerBasedWebSessionCacheTest.java
+++ b/src/test/java/com/googlesource/gerrit/plugins/websession/broker/BrokerBasedWebSessionCacheTest.java
@@ -55,7 +55,8 @@
 
   private static final int DEFAULT_ACCOUNT_ID = 1000000;
   private static final String KEY = "aSceprtma6B0qZ0hKxXHvQ5iyfUhCcFXxG";
-  private static Val VAL = FakeWebSessionVal.getVal(Account.id(1), ExternalId.Key.parse("foo:bar"));
+  private static Val VAL =
+      FakeWebSessionVal.getVal(Account.id(1), ExternalId.Key.parse("foo:bar", true));
   private static final String PLUGIN_NAME = "websession-broker";
 
   private byte[] emptyPayload = new byte[] {-84, -19, 0, 5, 112};