RFR: 8262881: port JVM/DI tests from JDK-4413752 to JVM/TI [v2]
Daniel D.Daugherty
dcubed at openjdk.java.net
Tue Mar 23 14:28:46 UTC 2021
On Sun, 21 Mar 2021 15:15:54 GMT, lyndseyBeil <github.com+81080647+lyndseyBeil at openjdk.org> wrote:
>> Daniel D. Daugherty has updated the pull request incrementally with one additional commit since the last revision:
>>
>> sspitsyn - fix white space indents problems.
>
> test/hotspot/jtreg/serviceability/jvmti/SuspendWithObjectMonitorEnter/SuspendWithObjectMonitorEnter.java line 92:
>
>> 90: native static int GetResult();
>> 91: native static void SetPrintDebug();
>> 92: native static void SuspendThread(int id, SuspendWithObjectMonitorEnterWorker thr);
>
> I detect that this code is problematic. According to the [Bad practice (BAD_PRACTICE)](https://spotbugs.readthedocs.io/en/stable/bugDescriptions.html#bad-practice-bad-practice), [Nm: Method names should start with a lower case letter (NM_METHOD_NAMING_CONVENTION)](https://spotbugs.readthedocs.io/en/stable/bugDescriptions.html#nm-method-names-should-start-with-a-lower-case-letter-nm-method-naming-convention).
> Methods should be verbs, in mixed case with the first letter lowercase, with the first letter of each internal word capitalized.
Nice catch. In the original 20 year old test those methods were:
native static int diobj4413752GetMonitorInfo(int id, Object mon);
native static int diobj4413752GetResult();
native static int diobj4413752SuspendThread(int id, diobjWorker thr);
native static int diobj4413752Wait4ContendedEnter(int id, diobjWorker thr);
so when I got rid of the `diobj4413752` prefix I forgot to fix the new first letter.
I'll take care of those method renames and I'll double check for others.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2899
More information about the hotspot-runtime-dev
mailing list