summaryrefslogtreecommitdiffstats
path: root/test/046-reflect
diff options
context:
space:
mode:
authorJeff Hao <jeffhao@google.com>2013-03-18 19:04:24 -0700
committerJeff Hao <jeffhao@google.com>2013-03-18 19:04:24 -0700
commit7a549467e332398229724058c07d998d0acfb0bb (patch)
treecf80f8b7004cefba91b06d9c5ef3099da53deb1d /test/046-reflect
parent225ade2eef559a8609879f142789a4f59aec5704 (diff)
downloadart-7a549467e332398229724058c07d998d0acfb0bb.zip
art-7a549467e332398229724058c07d998d0acfb0bb.tar.gz
art-7a549467e332398229724058c07d998d0acfb0bb.tar.bz2
Pass NULL as receiver for static methods for ArgArray builder.
The receiver field is ignored for static methods, and may be null, but it could be anything. Changed test 46 to make sure the value is properly handled when it is not null. Change-Id: Ide182b99c40a757e158f3587de7b413cd0cbb089
Diffstat (limited to 'test/046-reflect')
-rw-r--r--test/046-reflect/src/Main.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/046-reflect/src/Main.java b/test/046-reflect/src/Main.java
index cf0a7e6..9d4cacf 100644
--- a/test/046-reflect/src/Main.java
+++ b/test/046-reflect/src/Main.java
@@ -391,6 +391,17 @@ public class Main {
}
try {
+ String s = "Should be ignored";
+ m.invoke(s, new Object(), Object.class);
+ } catch (IllegalAccessException iae) {
+ iae.printStackTrace();
+ return;
+ } catch (InvocationTargetException ite) {
+ ite.printStackTrace();
+ return;
+ }
+
+ try {
System.out.println("checkType invoking null");
m.invoke(null, new Object(), int.class);
System.out.println("ERROR: should throw InvocationTargetException");