On 12/9/19 3:47 PM, Daniil Titov wrote:
Hi Mandy and Bob,

Please review a new version of the webrev [1] that moves doPrivileged calls in
jdk.internal.platform.cgroupv1.SubSystem to separate methods that throw
  IOException, as Mandy suggested.

Mach5 tests are still running.


[1] Webrev: http://cr.openjdk.java.net/~dtitov/8226575/webrev.06/

I reviewed Metrics and Subsystem in this version.

I  think it's simpler to have unwrapIOExceptionAndRethrow handling the InternalError case.


+ List<String> lines = subsystem.readMatchingLines(param);
+ for (String line : lines) {
                 if (line.startsWith(match)) {
                     retval = conversion.apply(line);
                     break;
                 }
}This can simply call Metrics::readFilePrivileged and process on the Stream<String>. return Metrics::readFilePrivileged(Paths.get(subsystem.path(), param))
            .filter(line -> line.startsWith(match))
            .map(conversion::apply)
            .findFirst().orElseGet(() ->retval);


I don't need to see a new webrev.

Mandy

Reply via email to