[Java] Simplify ray cmd params (#10394)

This commit is contained in:
chaokunyang
2020-09-02 19:47:52 +08:00
committed by GitHub
parent 6fa0edfbef
commit f10a5a40b0
9 changed files with 89 additions and 34 deletions
+1 -1
View File
@@ -256,7 +256,7 @@ inline ID JavaByteArrayToId(JNIEnv *env, const jbyteArray &bytes) {
std::string id_str(ID::Size(), 0);
env->GetByteArrayRegion(bytes, 0, ID::Size(),
reinterpret_cast<jbyte *>(&id_str.front()));
auto arr_size = env->GetArrayLength(bytes);
auto arr_size = static_cast<size_t>(env->GetArrayLength(bytes));
RAY_CHECK(arr_size == ID::Size())
<< "ID length should be " << ID::Size() << " instead of " << arr_size;
return ID::FromBinary(id_str);