On Wed, 4 Dec 2024 05:24:15 GMT, Henry Jen <henry...@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:
> 
>   Set java.vm.vendor from VersionProps.java

src/hotspot/share/runtime/abstract_vm_version.cpp line 132:

> 130: 
> 131: static const char vm_vendor_string[sizeof(VENDOR) < VENDOR_PADDING ? 
> VENDOR_PADDING : sizeof(VENDOR)] = VENDOR;
> 132: const char* Abstract_VM_Version::_vendor_branding_override = nullptr;

Can't we just have:

const char* Abstract_VM_Version::_vm_vendor = vm_vendor_string; // Default 
unless overridden from VersionProps
const char* Abstract_VM_Version::vm_vendor() { return _vm_vendor; }
void Abstract_VM_Version::set_vm_vendor(const char* vm_vendor) {
  _vm_vendor = ...
}

???

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

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

Reply via email to