On Mon, 26 Apr 2021 08:50:36 GMT, Patrick Concannon <pconcan...@openjdk.org> wrote:
> Hi, > > Could someone please review my code for updating the code in the > `java.security` package to make use of the `instanceof` pattern variable? > > Kind regards, > Patrick Marked as reviewed by rriggs (Reviewer). 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) ------------- PR: https://git.openjdk.java.net/jdk/pull/3687