On Wed, 23 Oct 2024 02:14:49 GMT, Chen Liang <[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();
In other place in the code, I've written out "ell" to avoid any confusion
between lowercase "l" and a number "1", etc.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21652#discussion_r1813057470