diff --git a/native-library-common/pom.xml b/native-library-common/pom.xml
index 83a9c097950..c334259350d 100644
--- a/native-library-common/pom.xml
+++ b/native-library-common/pom.xml
@@ -27,13 +27,6 @@
Apache BookKeeper :: Common for Native Libraries
Common for Native Libraries
-
-
- com.google.guava
- guava
-
-
-
diff --git a/native-library-common/src/main/java/org/apache/bookkeeper/common/util/nativelib/NativeUtils.java b/native-library-common/src/main/java/org/apache/bookkeeper/common/util/nativelib/NativeUtils.java
index 7f8e42a3a51..fbd70c3747f 100644
--- a/native-library-common/src/main/java/org/apache/bookkeeper/common/util/nativelib/NativeUtils.java
+++ b/native-library-common/src/main/java/org/apache/bookkeeper/common/util/nativelib/NativeUtils.java
@@ -20,8 +20,6 @@
*/
package org.apache.bookkeeper.common.util.nativelib;
-import static com.google.common.base.Preconditions.checkArgument;
-
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
@@ -30,6 +28,7 @@
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Locale;
+import lombok.NonNull;
import lombok.experimental.UtilityClass;
/**
@@ -115,4 +114,10 @@ public static String libType() {
}
throw new TypeNotPresentException(OS_NAME + " not supported", null);
}
+
+ public static void checkArgument(boolean expression, @NonNull Object errorMessage) {
+ if (!expression) {
+ throw new IllegalArgumentException(String.valueOf(errorMessage));
+ }
+ }
}