On Wed, 23 Oct 2024 02:06:20 GMT, Joe Darcy <[email protected]> wrote:
> Noticed this refactoring opportunity while doing some other work in the area.
src/java.base/share/classes/java/lang/Long.java line 1249:
> 1247: public boolean equals(Object obj) {
> 1248: if (obj instanceof Long ell) {
> 1249: return value == ell.longValue();
Suggestion:
if (obj instanceof Long l) {
return value == l.longValue();
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21652#discussion_r1811668798
