On Thu, 26 May 2022 15:23:35 GMT, Ioi Lam <ik...@openjdk.org> wrote:

>> Maxim Kartashev has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Removed unnecessary null checks
>
> src/java.base/linux/classes/jdk/internal/platform/CgroupSubsystemFactory.java 
> line 116:
> 
>> 114:         } else {
>> 115:             CgroupV1Subsystem subsystem = 
>> CgroupV1Subsystem.getInstance(infos);
>> 116:             return new CgroupV1MetricsImpl(subsystem);
> 
> This shouldn't be changed because the current implementation of 
> `CgroupV1Subsystem.getInstance(infos)` has a path that returns null.
> 
> Maybe that's impossible, because when we call 
> `CgroupV1Subsystem.getInstance`, we must have at least one v1 subsystem in 
> `infos`. However, that's not related to this issue.  Please fix that in a 
> separate RFE. For example, `CgroupV1Subsystem.getInstance(infos)`  can be 
> changed to throw an exception instead if return null.

Fine by me; done.

-------------

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

Reply via email to