Skip to content

Commit

Permalink
Remove the check of java primitive types (ray-project#2495)
Browse files Browse the repository at this point in the history
  • Loading branch information
raulchen authored and robertnishihara committed Jul 27, 2018
1 parent 29451cc commit 5b015f9
Showing 1 changed file with 1 addition and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}

Expand All @@ -51,4 +41,4 @@ public String toString() {
public UniqueID getFuncId() {
return funcId;
}
}
}

0 comments on commit 5b015f9

Please sign in to comment.