On Mon, 2 Dec 2024 18:40:58 GMT, Alan Bateman <[email protected]> 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.
>
> src/java.base/share/classes/java/lang/VersionProps.java.template line 131:
>
>> 129: // Default branding.conf value is "N/A", which did not affect
>> java.vm.vendor
>> 130: if (! VENDOR_VM.equals("N/A")) {
>> 131: props.put("java.vm.vendor", VENDOR_VM);
>
> Magnus might have suggestions on this, maybe it would be better to default in
> the conf file to the empty string so that we don't have to deal with "N/A" in
> several places.
We can surely change the default. We just must make sure that all code that
uses the vendor define is prepared to handle an empty string.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21964#discussion_r1867825103