On 10/17/16 9:59 PM, David Holmes wrote:
Hi Lois, Dan, Serguei,
Went to push this today and realized I had left off the updated JNI
method lookup tests. As I said in the bug report JNI behaves as
expected, but there weren't any testcases so I added them:
L74: lookup(A.class.getName(), "onlyA", null); //should succeed
L90: lookup(Impl2.class.getName(), "onlyC",
NoSuchMethodError.class); //should fail
nit: please add a space after '//'
L138: String desc = " Lookup of " + definingClass + "." +
nit: any particular reason for the space before Lookup?
L78: blank line at the end of the file. jcheck will probably complain.
Thumbs up! Feel free to ignore the nits. No need to see a new
webrev if you fix them.
On 11/10/2016 11:55 AM, David Holmes wrote:
Turns out the only place changes were needed were in JDI.
The spec change in ObjectReference is very simple and there is a CCC
request in progress to ratify that change.
The implementation change in ObjectReferenceImpl mirrors the updated
spec and use the same format as already present in the class version of
the check method.
The test is a little more complex. This is obviously an extension to
what is already tested in InterfaceMethodsTest. However IMT has a number
of problem with the way it is currently written  - specifically it
doesn't properly separate method lookup from method invocation. So I've
added the capability to separate lookup and invocation for use with the
private interface methods - I have not tried to address shortcomings of
the existing tests. Though I did fix the return value checking logic!
And did some clarifying comments and renaming in a couple of place.
Still on the test I can't add the negative tests I would like to add
because they actually pass due to a different long standing bug in JDI -
. So the actual private interface method testing is very simple: can
I get the Method from the InterfaceType for the interface declaring the
method? Can I then invoke that method on an instance of a class that
implements the interface.