Issue Details (XML | Word | Printable)

Key: RVM-544
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Ian Rogers
Reporter: Ian Rogers
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
RVM

Class argument in NewObject ignored

Created: 27/Jun/08 06:09 AM   Updated: 04/Jul/08 02:24 PM
Component/s: Runtime: JNI
Affects Version/s: 2.9.3
Fix Version/s: 3.0

Time Tracking:
Not Specified


 Description  « Hide
When creating a new object by reflection in JNI code we wrap the method in a constructor object then invoke it to create a new instance, however the provided method may belong to a super class object if the class didn't declare a constructor of its own - in which case we get an object of the super class type in our current implementation.

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Ian Rogers added a comment - 27/Jun/08 06:20 AM
It's not clear to me whether this is a bug in GetMethodID or NewObject.. GetMethodID uses a class to find a named method.. but then from that method it gets the reference.. if there was no overriding method then GetMethodID will return the ID of a method in the super class, rather than one that belongs to the class in question. This is certainly causing the NewObject bug, but its not clear whether we want to fix NewObject or GetMethodID.

Ian Rogers added a comment - 27/Jun/08 07:18 AM
Fix in r14598.

David Grove added a comment - 04/Jul/08 02:22 PM
reopening so I can modify fix target to 3.0