RFR: 8337840: Remove redundant null check in ObjectOutputStream.writeProxyDesc
Roger Riggs
rriggs at openjdk.org
Wed Aug 7 16:44:31 UTC 2024
On Fri, 26 Jul 2024 13:09:19 GMT, Andrey Turbanov <aturbanov at openjdk.org> wrote:
> There is implicit null check in line before.
>
> https://github.com/openjdk/jdk/blob/431d4f7e18369466eedd00926a5162a1461d0b25/src/java.base/share/classes/java/io/ObjectOutputStream.java#L1267-L1277
>
> 'cl' can't be null after that.
lgtm
Hotspot would have elided this check anyway based on the previous implicit check.
The review overhead is higher than the value add to the source.
-------------
Marked as reviewed by rriggs (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/20351#pullrequestreview-2225694241
More information about the core-libs-dev
mailing list