We're updating the issue view to help you get more done. 

Wrong exception from Java reflection

Description

It appears that Jikes RVM has a bug in the implementation of its reflection.
For the detail, look at the patch and the test case: reflection.patch and
Reflection.java. Try the following.

1. To see the bug, try the following three command lines.

$javac ReflectionTest.java

$java -showversion ReflectionTest
java version "1.6.0_10"
Java(TM) SE Runtime Environment (build 1.6.0_10-b33)
Java HotSpot(TM) Server VM (build 11.0-b15, mixed mode)

newInstance: pass
invokeVirtual: pass
invokeStatic: pass

$rvm ReflectionTest
...
newInstance: pass
invokeVirtual: fail
unexpected cause of the Invocation target exception:
java.lang.reflect.InvocationTargetException
...
invokeStatic: fail
unexpected cause of the Invocation target exception:

2. To correct the bug, try the following.

  • Apply the patch: reflection.patch

  • Build Jikes RVM

  • Run it

$rvm ReflectionTest
newInstance: pass
invokeVirtual: pass
invokeStatic: pass

Environment

Intel IA32, Linux 2.6.27, Ubuntu 8.10

Status

Assignee

DaveG

Reporter

Byeong Lee

Labels

None

External issue ID

None

Components

Fix versions

Affects versions

git tip
3.0.1

Priority

High