RFR: 8258422: Cleanup unnecessary null comparison before instanceof check in java.base [v4]
Andrey Turbanov
github.com+741251+turbanoff at openjdk.java.net
Thu Dec 17 11:37:59 UTC 2020
On Thu, 17 Dec 2020 10:29:50 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Andrey Turbanov has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8258422: Cleanup unnecessary null comparison before instanceof check in java.base
>> take advantage of "flow scoping" to eliminate casts
>
> src/java.base/share/classes/jdk/internal/misc/Signal.java line 102:
>
>> 100: */
>> 101: public boolean equals(Object other) {
>> 102: if (this == other) {
>
> It might be a bit cleaner to rename Object other to "obj" to avoid having Object other and Signal other1.
Actually, I'm not sure if `oth` is better name for variable than `other1`.
I would say they have the same rank :)
-------------
PR: https://git.openjdk.java.net/jdk/pull/20
More information about the nio-dev
mailing list