From d584a4e5c458bd8f9917c57b3073e5a5c420e5e7 Mon Sep 17 00:00:00 2001 From: chaokunyang Date: Tue, 1 Sep 2020 19:57:03 +0800 Subject: [PATCH] Fix java ci break (#10472) --- src/ray/core_worker/lib/java/jni_utils.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ray/core_worker/lib/java/jni_utils.h b/src/ray/core_worker/lib/java/jni_utils.h index 972b43f71..02e9f1731 100644 --- a/src/ray/core_worker/lib/java/jni_utils.h +++ b/src/ray/core_worker/lib/java/jni_utils.h @@ -256,8 +256,8 @@ inline ID JavaByteArrayToId(JNIEnv *env, const jbyteArray &bytes) { std::string id_str(ID::Size(), 0); env->GetByteArrayRegion(bytes, 0, ID::Size(), reinterpret_cast(&id_str.front())); - auto arr_size = env->GetArrayLength(bytes) - RAY_CHECK(arr_size == ID::Size()) << "ID length should be " ID::Size() << " instead of " << arr_size; + auto arr_size = env->GetArrayLength(bytes); + RAY_CHECK(arr_size == ID::Size()) << "ID length should be " << ID::Size() << " instead of " << arr_size; return ID::FromBinary(id_str); }