mirror of
https://github.com/wassname/ray.git
synced 2026-08-02 13:01:01 +08:00
Fix java ci break (#10470)
This commit is contained in:
@@ -10,7 +10,7 @@ import java.util.Arrays;
|
||||
*/
|
||||
public class JobId extends BaseId implements Serializable {
|
||||
|
||||
public static final int LENGTH = 2;
|
||||
public static final int LENGTH = 4;
|
||||
|
||||
public static final JobId NIL = genNil();
|
||||
|
||||
|
||||
@@ -256,6 +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<jbyte *>(&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;
|
||||
return ID::FromBinary(id_str);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user