Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Check if we actually got a return value from the Java method.
This fixes shortname candidates that return void throwing a NullPointerException.
  • Loading branch information
peschwa committed Jan 5, 2015
1 parent d3900c8 commit 1b769df
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/vm/jvm/runtime/org/perl6/rakudo/RakudoJavaInterop.java
Expand Up @@ -259,8 +259,12 @@ public RakudoJavaInterop(GlobalContext gc) {
}

public static Object filterReturnValueMethod(Object in, ThreadContext tc) {
Class<?> what = in.getClass();
GlobalExt gcx = RakOps.key.getGC(tc);
if(in == null) {
return gcx.Nil;
}

Class<?> what = in.getClass();
Object out = null;
if(what == void.class) {
out = null;
Expand Down

0 comments on commit 1b769df

Please sign in to comment.