Bazel: Drop dependency on commons-lang3 library

Replace the only usage of Validate.notNull() from this library with JDK
own Objects.requireNonNull() method.

Change-Id: Iab3d13f50b0d980ca55b01a7b9d3f84bcbb9ab0a
diff --git a/BUILD b/BUILD
index 7cc002b..ee78d2f 100644
--- a/BUILD
+++ b/BUILD
@@ -17,7 +17,6 @@
     ],
     resources = glob(["src/main/resources/**/*"]),
     deps = [
-        "@commons-lang3//jar",
         "@curator-client//jar",
         "@curator-framework//jar",
         "@curator-recipes//jar",
diff --git a/external_plugin_deps.bzl b/external_plugin_deps.bzl
index b81ac57..9f69653 100644
--- a/external_plugin_deps.bzl
+++ b/external_plugin_deps.bzl
@@ -52,12 +52,6 @@
     )
 
     maven_jar(
-        name = "commons-lang3",
-        artifact = "org.apache.commons:commons-lang3:3.6",
-        sha1 = "9d28a6b23650e8a7e9063c04588ace6cf7012c17",
-    )
-
-    maven_jar(
         name = "curator-test",
         artifact = "org.apache.curator:curator-test:" + CURATOR_VER,
         sha1 = "98ac2dd69b8c07dcaab5e5473f93fdb9e320cd73",
diff --git a/src/main/java/com/googlesource/gerrit/plugins/multisite/kafka/consumer/SourceAwareEventWrapper.java b/src/main/java/com/googlesource/gerrit/plugins/multisite/kafka/consumer/SourceAwareEventWrapper.java
index 09fbe0d..cc638c0 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/multisite/kafka/consumer/SourceAwareEventWrapper.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/multisite/kafka/consumer/SourceAwareEventWrapper.java
@@ -14,11 +14,12 @@
 
 package com.googlesource.gerrit.plugins.multisite.kafka.consumer;
 
+import static java.util.Objects.requireNonNull;
+
 import com.google.gerrit.server.events.Event;
 import com.google.gson.Gson;
 import com.google.gson.JsonObject;
 import java.util.UUID;
-import org.apache.commons.lang3.Validate;
 
 public class SourceAwareEventWrapper {
 
@@ -67,9 +68,9 @@
     }
 
     public void validate() {
-      Validate.notNull(eventId, "EventId cannot be null");
-      Validate.notNull(eventType, "EventType cannot be null");
-      Validate.notNull(sourceInstanceId, "Source Instance ID cannot be null");
+      requireNonNull(eventId, "EventId cannot be null");
+      requireNonNull(eventType, "EventType cannot be null");
+      requireNonNull(sourceInstanceId, "Source Instance ID cannot be null");
     }
 
     @Override
@@ -94,8 +95,8 @@
   }
 
   public void validate() {
-    Validate.notNull(header, "Header cannot be null");
-    Validate.notNull(body, "Body cannot be null");
+    requireNonNull(header, "Header cannot be null");
+    requireNonNull(body, "Body cannot be null");
     header.validate();
   }
 }