On Thu, 19 Nov 2020 01:22:01 GMT, Poonam Bajaj <poo...@openjdk.org> wrote:
> Hi, > > Please review this simple change that catches UncheckedIOException that can > occur if /proc/self/cgroup or /proc/self/mountinfo files don't exist on the > system, or if there is an interrupt while these are being read. > > Testing: Tier1, Tier2 and Tier3. > > Thanks, > Poonam Changes requested by shade (Reviewer). src/java.base/linux/classes/jdk/internal/platform/cgroupv1/CgroupV1Subsystem.java line 79: > 77: .forEach(entry -> createSubSystemController(subsystem, > entry)); > 78: > 79: } catch (UncheckedIOException e) { I am confused. `CgroupUtil.readFilePrivileged` unwraps `UncheckedIOException`, why this catch clause is needed? Is this because the cause might be `UncheckedIOException` itself? Might be easier to rewrap `UncheckedIOException` to just `IOException` in `CgroupUtil`. src/java.base/linux/classes/jdk/internal/platform/CgroupUtil.java line 50: > 48: throw new InternalError(e.getCause()); > 49: } catch (UncheckedIOException e) { > 50: throw e.getCause(); There are other reader methods in the same file, should this block be added to them as well? ------------- PR: https://git.openjdk.java.net/jdk/pull/1303