From 5b015f9a799cfdd64c9417984a06e78091ced6eb Mon Sep 17 00:00:00 2001 From: Hao Chen Date: Sat, 28 Jul 2018 02:44:19 +0800 Subject: [PATCH] Remove the check of java primitive types (#2495) --- .../src/main/java/org/ray/spi/model/RayMethod.java | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) 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 ae44341cc..bb1179b5f 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 class RayMethod { RayMethod method = new RayMethod(m, remoteAnnotation != null ? remoteAnnotation : parentRemoteAnnotation, funcId); - method.check(); return method; } @@ -51,4 +41,4 @@ public class RayMethod { public UniqueID getFuncId() { return funcId; } -} \ No newline at end of file +}