-
Enhancement
-
Resolution: Unresolved
-
P4
-
9
Comments from dholmes concerning problems with the test:
It hadn't occurred to me that reflective lookup of the method would fail before we even get to the invocation part of the test. To me this further demonstrates the confusing way this test has been written because we don't actually test the invocation mechanism in those cases! This means some things that should be tested are not. For example:
244 // "staticMethodA" must not be inherited by InterfaceB
245 testInvokeNeg(ifaceClass, null, "staticMethodA", "()I", vm().mirrorOf(RESULT_A),
246 "Static interface methods are not inheritable");
fails because method lookup in InterfaceB fails, but what we should also be testing is the actual InterfaceType.invokeMethod on InterfaceB using the Method for staticMethodA obtained from InterfaceA. So this suite of tests in incomplete.
It is also unclear to me if some things that should be checked at the JDWP level are in fact caught at the JDI level - a lot of argument checking/validation occurs in the JDI Java code. You might have written your fix in the Java code, but that would not have fixed JDWP. So it makes me wonder if other things are checked at the JDI level instead of the JDWP level!
Aside: The test also seems to be missing half the invocation tests because for each call that ends up doing a virtual/non-virtual invoke, there should a corresponding non-virtual/virtual invoke.
Thanks,
David
It hadn't occurred to me that reflective lookup of the method would fail before we even get to the invocation part of the test. To me this further demonstrates the confusing way this test has been written because we don't actually test the invocation mechanism in those cases! This means some things that should be tested are not. For example:
244 // "staticMethodA" must not be inherited by InterfaceB
245 testInvokeNeg(ifaceClass, null, "staticMethodA", "()I", vm().mirrorOf(RESULT_A),
246 "Static interface methods are not inheritable");
fails because method lookup in InterfaceB fails, but what we should also be testing is the actual InterfaceType.invokeMethod on InterfaceB using the Method for staticMethodA obtained from InterfaceA. So this suite of tests in incomplete.
It is also unclear to me if some things that should be checked at the JDWP level are in fact caught at the JDI level - a lot of argument checking/validation occurs in the JDI Java code. You might have written your fix in the Java code, but that would not have fixed JDWP. So it makes me wonder if other things are checked at the JDI level instead of the JDWP level!
Aside: The test also seems to be missing half the invocation tests because for each call that ends up doing a virtual/non-virtual invoke, there should a corresponding non-virtual/virtual invoke.
Thanks,
David
- relates to
-
JDK-8167416 JDI: ReferenceType.allMethods() and visibleMethods() should not return private or other non-inherited methods
- Open