RFR: 8342035: jlink plugins for setting java.vendor, java.vm.vendor and java.vendor.url [v4]

Mandy Chung mchung at openjdk.org
Wed Dec 4 18:44:41 UTC 2024


On Wed, 4 Dec 2024 07:31:24 GMT, Henry Jen <henryjen at openjdk.org> wrote:

>> Add jlink plugins to allow branding change for java.vendor, java.vm.vendor and java.vendor.url.
>> 
>> The jlink plugin will change the value in java.lang.VersionProps, which will set those property values. The `java.vm.vendor` was initialized by VM with value set at build time, and then later be replaced with value from VersionProps.
>> 
>> To keep current behavior, we treat 'N/A' value as no-op to mimic current build behavior. Perhaps we don't really need this, as proper value should be set with `branding.conf` in official build.
>
> Henry Jen has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Clean up adapting review comments

src/hotspot/share/runtime/threads.cpp line 401:

> 399:     JDK_Version::set_runtime_vendor_vm_bug_url(get_java_version_info(ik, vmSymbols::java_runtime_vendor_vm_bug_url_name()));
> 400: 
> 401:     VM_Version::set_vm_vendor(get_java_version_info(ik, vmSymbols::java_runtime_vendor_vm_name()));

Nit: not sure what naming convention should follow as VM_Version and JDK_Version no longer contain version info only.  

`vm_vendor` and `runtime_vendor_vm_bug_url` should be together.    Perhaps `JDK_Version` should be renamed to reflect that they are fields in `VersionProps` class and so `VM_Version::vm_vendor` can be moved/renamed to `JDK_Version::runtime_vendor_vm`.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/21964#discussion_r1870098185


More information about the core-libs-dev mailing list