Skip to content

Commit c50f3df

Browse files
committed
use actual void class
1 parent 3ebf935 commit c50f3df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/co/cask/hydrator/plugin/spark/dynamic/ScalaSparkCodeExecutor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ private Method getMethod(ClassLoader classLoader, String className) {
298298

299299
// The return type of the method must be Unit
300300
if (isVoid) {
301-
if (!"void".equals(method.getReturnType().getName())) {
301+
if (!void.class.equals(method.getReturnType())) {
302302
throw new IllegalArgumentException(String.format("The return type of the '%s' method should be 'Unit'",
303303
methodName));
304304
}

0 commit comments

Comments
 (0)