mirror of
https://github.com/wassname/ray.git
synced 2026-06-27 18:44:07 +08:00
[Core] Force get_actor(name)'s name to be non-empty string (#12218)
This commit is contained in:
@@ -216,6 +216,9 @@ public final class RayNativeRuntime extends AbstractRayRuntime {
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public <T extends BaseActorHandle> Optional<T> getActor(String name, boolean global) {
|
||||
if (name.isEmpty()) {
|
||||
return Optional.empty();
|
||||
}
|
||||
byte[] actorIdBytes = nativeGetActorIdOfNamedActor(name, global);
|
||||
ActorId actorId = ActorId.fromBytes(actorIdBytes);
|
||||
if (actorId.isNil()) {
|
||||
|
||||
Reference in New Issue
Block a user