[jdk8u-dev] RFR: 8287073: NPE from CgroupV2Subsystem.getInstance()
Andrew John Hughes
andrew at openjdk.org
Fri Aug 11 03:29:28 UTC 2023
On Fri, 26 May 2023 14:46:38 GMT, Severin Gehwolf <sgehwolf at openjdk.org> wrote:
> Simple low-risk backport avoiding a potential NPE on some cgroups v2 systems. Patch applies clean after path unshuffeling.
>
> Testing:
> - [x] Container tests on Linux x86_64. Pass.
> - [x] Regression test from #323
Backport verified clean and approved for 8u.
A question on the general patch out of interest; do we know that `infos.values().iterator().next()` will return non-null or is it just a lot less likely? I see that `Objects.requireNonNull` is still going to throw an NPE if it is `null`, which will at least catch this earlier than the current code.
-------------
Marked as reviewed by andrew (Reviewer).
PR Review: https://git.openjdk.org/jdk8u-dev/pull/324#pullrequestreview-1572949118
More information about the jdk8u-dev
mailing list