1.1 --- a/emul/src/main/java/java/lang/reflect/Method.java Fri Dec 28 12:35:32 2012 +0100
1.2 +++ b/emul/src/main/java/java/lang/reflect/Method.java Mon Jan 07 18:27:01 2013 +0100
1.3 @@ -512,6 +512,9 @@
1.4 throws IllegalAccessException, IllegalArgumentException,
1.5 InvocationTargetException
1.6 {
1.7 + if ((getModifiers() & Modifier.STATIC) == 0 && obj == null) {
1.8 + throw new NullPointerException();
1.9 + }
1.10 Object res = invoke0(this, obj, args);
1.11 if (getReturnType().isPrimitive()) {
1.12 res = fromPrimitive(getReturnType(), res);
1.13 @@ -547,7 +550,9 @@
1.14 if (type == Short.TYPE) {
1.15 return fromRaw(Short.class, "valueOf__Ljava_lang_Short_2S", o);
1.16 }
1.17 -// case 'V': return Void.TYPE;
1.18 + if (type.getName().equals("void")) {
1.19 + return null;
1.20 + }
1.21 throw new IllegalStateException("Can't convert " + o);
1.22 }
1.23