On Fri, 4 Oct 2024 20:05:22 GMT, Kevin Driver <kdri...@openjdk.org> wrote:

>> I think `this` is necessary when there are input arguments having the same 
>> name as the instance fields. This happens a lot in a constructor when fields 
>> are being initialized from input arguments. In other methods, it's more 
>> common to avoid using `this`.
>
> Sure. I only mention it because within the same method it is inconsistent. 
> See the next line. `key` is not a parameter to the method, yet `this.key` is 
> used.

Ah, I see what you mean. I would remove those `this`, there is no ambiguity 
here.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21167#discussion_r1790158845

Reply via email to