RFR: 8265426: Update java.security to use instanceof pattern variable [v3]
Patrick Concannon
pconcannon at openjdk.java.net
Thu May 6 11:52:16 UTC 2021
On Mon, 26 Apr 2021 18:14:21 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
>> Patrick Concannon has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8265426: Reverted parameter names; removed redundant parenthesis
>
> src/java.base/share/classes/java/security/CodeSource.java line 174:
>
>> 172: // certs must match
>> 173: return matchCerts(other, true);
>> 174: }
>
> Can this (160-173) be collapsed to:
>
> return (obj instanceof CodeSource cs) && Objects.equals(location, other.location) && matchCerts(cs, true)
Code refactored as suggested. See 9e9f9fb
-------------
PR: https://git.openjdk.java.net/jdk/pull/3687
More information about the security-dev
mailing list