diff --git a/java/runtime-common/src/main/java/org/ray/spi/model/RayMethod.java b/java/runtime-common/src/main/java/org/ray/spi/model/RayMethod.java index ae44341ccc83..bb1179b5f3f5 100644 --- a/java/runtime-common/src/main/java/org/ray/spi/model/RayMethod.java +++ b/java/runtime-common/src/main/java/org/ray/spi/model/RayMethod.java @@ -15,15 +15,6 @@ public class RayMethod { public final RayRemote remoteAnnotation; private final UniqueID funcId; - public void check() { - for (Class paramCls : invokable.getParameterTypes()) { - if (paramCls.isPrimitive()) { - throw new RuntimeException( - "@RayRemote function " + fullName + " must have all non-primitive typed parameters"); - } - } - } - private RayMethod(Method m, RayRemote remoteAnnotation, UniqueID funcId) { this.invokable = m; this.remoteAnnotation = remoteAnnotation; @@ -39,7 +30,6 @@ public static RayMethod from(Method m, RayRemote parentRemoteAnnotation) { RayMethod method = new RayMethod(m, remoteAnnotation != null ? remoteAnnotation : parentRemoteAnnotation, funcId); - method.check(); return method; } @@ -51,4 +41,4 @@ public String toString() { public UniqueID getFuncId() { return funcId; } -} \ No newline at end of file +}