From 2e150358ad20e15cab400c084ddd4310b83e5102 Mon Sep 17 00:00:00 2001 From: Mohanned Anwar <92345336+Muhanned-Anwar@users.noreply.github.com> Date: Sun, 2 Apr 2023 08:56:57 +0300 Subject: [PATCH] Update NativeUtils.java --- ann/src/main/java/com/twitter/ann/faiss/NativeUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ann/src/main/java/com/twitter/ann/faiss/NativeUtils.java b/ann/src/main/java/com/twitter/ann/faiss/NativeUtils.java index a47456995..8de761d01 100644 --- a/ann/src/main/java/com/twitter/ann/faiss/NativeUtils.java +++ b/ann/src/main/java/com/twitter/ann/faiss/NativeUtils.java @@ -26,7 +26,7 @@ public final class NativeUtils { } String[] parts = path.split("/"); - String filename = parts.length > 1 ? parts[parts.length - 1] : null; + String filename = (parts.length > 1) ? parts[parts.length - 1] : null; if (filename == null || filename.length() < MIN_PREFIX_LENGTH) { throw new IllegalArgumentException("The filename has to be at least 3 characters long.");