On Fri, 2 Aug 2024 15:41:36 GMT, Michael Strauß <mstra...@openjdk.org> wrote:

>> I know what @kevinrushforth would say: "it is better to avoid introducing 
>> unrelated changes"
>> 
>> as long as the new code omits `= null` we should be fine.
>> 
>> (rationale for omitting: explicit initialization creates an unnecessary step 
>> in the debugger)
>
> I've removed the `= null` for consistency on both fields.

> I know what @kevinrushforth would say: "it is better to avoid introducing 
> unrelated changes"

Yes, that is what I would say. :)

> as long as the new code omits `= null` we should be fine.
> 
> (rationale for omitting: explicit initialization creates an unnecessary step 
> in the debugger)

In this case, omitting it is fine. There are cases where I prefer to explicitly 
initialize fields to `null`, `false`, or `0`, for clarity, even though those 
values are the default. I don't care that it creates an unnecessary step in 
your debugger.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1522#discussion_r1702041658

Reply via email to