RFR 8040167: JDWP spec for ClassType#InvokeMethod contradicts JLS

serguei.spitsyn at oracle.com serguei.spitsyn at oracle.com
Tue Apr 15 09:20:04 UTC 2014


Reviewed.

Thanks,
Serguei

On 4/15/14 1:21 AM, Jaroslav Bachorik wrote:
> Please, review this simple doc change.
>
> Issue : https://bugs.openjdk.java.net/browse/JDK-8040167
> Webrev: http://cr.openjdk.java.net/~jbachorik/8040167/webrev.00/
>
> Currently, the generated JDWP documentation falsely states that the 
> InvokeMethod command
> "Invokes a static method. The method must be member of the class type 
> or one of its superclasses,
> *superinterfaces*, or implemented interfaces."
>
> Up till JDK8 this was almost non-problem since interfaces could not 
> specify static methods. For JDK8 this brings in ambiguity and 
> contradicts JLS.
>
> The JDI docs 
> (http://docs.oracle.com/javase/8/docs/jdk/api/jpda/jdi/com/sun/jdi/ClassType.html#invokeMethod-com.sun.jdi.ThreadReference-com.sun.jdi.Method-java.util.List-int-) 
> state correctly that the InvokeMethod can be uses only on static 
> methods from the class or its superclasses (no mention of interface) - 
> following the JLS 
> (http://docs.oracle.com/javase/specs/jls/se8/html/jls-8.html#jls-8.4.8) rules. 
>
>
> The fix is to change the line to read
> "Invokes a static method. The method must be member of the class type 
> or one of its superclasses." instead.
>
> Thanks,
>
> -JB-



More information about the serviceability-dev mailing list