On Tue, 20 Feb 2024 09:21:41 GMT, Daniel Jeliński <[email protected]> wrote:
>> Jaikiran Pai has updated the pull request incrementally with one additional
>> commit since the last revision:
>>
>> Daniel's review - remove "final"
>
> src/java.net.http/share/classes/jdk/internal/net/http/common/Utils.java line
> 620:
>
>> 618:
>> 619: public static SSLParameters copySSLParameters(SSLParameters p) {
>> 620: final SSLParameters p1 = new SSLParameters();
>
> nit: I'm not a fan of labeling local variables as final; it doesn't add any
> value as far as I can tell. Can we keep it non-final?
Hello Daniel, I use it as a habit to mark even local variables as final to
prevent accidental reassignment, plus while reading the code to make it easier
to remember that the variable won't get reassigned after that line.
But that's just a personal preference. Plus this line isn't new and the rest of
the code doesn't use `final`, so I have updated the PR to remove this `final`
that was introduced in the previous revision.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17923#discussion_r1495552622