RFR: 8265418: Clean-up redundant null-checks of Class.getPackageName()

Сергей Цыпанов github.com+10835776+stsypanov at openjdk.java.net
Wed Apr 28 07:30:53 UTC 2021

On Mon, 19 Apr 2021 14:05:31 GMT, Сергей Цыпанов <github.com+10835776+stsypanov at openjdk.org> wrote:

> As discussed in https://github.com/openjdk/jdk/pull/3464 we can clean-up null-checks remaining after [8142968](https://bugs.openjdk.java.net/browse/JDK-8142968) as Class.getPackageName() never returns null.

Oh, now I see my mistake, I believed that after `pn.intern()` is called variable `pn` can be used along with returned value. Thanks for explanation!


PR: https://git.openjdk.java.net/jdk/pull/3571

More information about the core-libs-dev mailing list