On Wed, 21 Oct 2026 20:47:05 GMT, Alexander Matveev <[email protected]> 
wrote:

>> Add the upgrade code as input to the function that calculates the stable 
>> Component GUID.
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> src/jdk.jpackage/windows/classes/jdk/jpackage/internal/WixAppImageFragmentBuilder.java
>  line 419:
> 
>> 417:         }
>> 418: 
>> 419:         if (regKeyPath.isEmpty()) {
> 
> I think it is better to use `else` here without additional if. `else` from 
> `if (regKeyPath.isPresent())` check.

This would flip the order of `xml.writeAttribute("KeyPath", "yes");` and 
`xml.writeStartElement(role.name());` expressions and result in adding the 
"KeyPath" attribute to the wrong element.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/33450#discussion_r4342383058

Reply via email to