RFR JDK-8232724: Remove indirection with calling JNU_NewStringPlatform

Alexey Ivanov alexey.ivanov at oracle.com
Mon Oct 28 18:46:42 UTC 2019


Please review the following fix which removes indirection in calling 
JNU_NewStringPlatform via NewStringPlatform.

bug: https://bugs.openjdk.java.net/browse/JDK-8232724
webrev: http://cr.openjdk.java.net/~aivanov/8232724/webrev.00/

It is a follow-up fix to JDK-8232624 and JDK-8231355. It removes 
NewStringPlatform alias as Claes did in JDK-8231355. To call 
JNU_NewStringPlatform, the function pointer to_java_string_fn_t is 
declared with JNICALL (__stdcall); the function is looked up by both the 
undecorated name and the __stdcall-decorated name for Win32.

Tier 1 and 2 tests are all green.

There are two declarations of the to_java_string_fn_t function pointer: 
in jvm.h and locally in javaClasses. I searched the source code for it 
and didn't find any usages but in 
java_lang_String::create_from_platform_dependent_str. The declaration in 
jvm.h uses "char *" whereas javaClasses uses "const char *".

Shall I remove one of them? The one in jvm.h because it's unused?

Thank you in advance.



More information about the core-libs-dev mailing list