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 src/java.base/share/classes/java/security/Identity.java line 345: > 343: if (this.fullName().equals(other.fullName())) { > 344: return true; > 345: } else { Suggestion: src/java.base/share/classes/java/security/Identity.java line 349: > 347: } > 348: } > 349: return false; Suggestion: return obj instanceof Identity other && (this.fullName().equals(other.fullName()) || identityEquals(other)); ------------- PR: https://git.openjdk.java.net/jdk/pull/3687