RFR: 8311170: Simplify and modernize equals and hashCode in security area [v12]
Pavel Rappo
prappo at openjdk.org
Tue Aug 8 16:17:46 UTC 2023
On Tue, 8 Aug 2023 11:54:42 GMT, Pavel Rappo <prappo at openjdk.org> wrote:
>> src/java.security.jgss/share/classes/sun/security/krb5/internal/HostAddress.java line 105:
>>
>>> 103: return false;
>>> 104: if (address != null && h.address != null) {
>>> 105: return Arrays.equals(address, h.address);
>>
>> Can't this block be combined into:
>> return` addrType == h.addrType && Arrays.equals(address, h.address); `?
>
> Have a look at the end result (commits e71fc42a173 and d9316270976), is it better?
Oops: forgot to commit and push 608258e.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14738#discussion_r1287356149
More information about the security-dev
mailing list