RFR: 8245543: Cgroups: Incorrect detection logic on some systems (still reproducible) [v6]

Severin Gehwolf sgehwolf at openjdk.java.net
Fri Oct 9 09:49:19 UTC 2020


On Fri, 9 Oct 2020 09:23:22 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> Severin Gehwolf has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Return false in case of no pattern match
>
> src/java.base/linux/classes/jdk/internal/platform/CgroupSubsystemFactory.java line 183:
> 
>> 181:              }
>> 182:          }
>> 183:          return relevantControllerFound;
> 
> If I am reading the code right, then `relevantControllerFound` can be replaced with just `return true` or `return
> false`?

I don't think so. It starts out as `false` and is being set to true on lines 180 and 174. So we could change it to
`return false` here iff lines 174 and 180 would `return true`.

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

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


More information about the core-libs-dev mailing list