RFR: JDK-8293450 Convert test/closed/sun/management/ shell tests to Java version

Serguei Spitsyn sspitsyn at openjdk.org
Tue Nov 8 08:20:27 UTC 2022


On Mon, 7 Nov 2022 19:23:05 GMT, Bill Huang <bhuang at openjdk.org> wrote:

> There is no new changes in the open portion of JDK, but extracting common functionalities in bootstrap Utils to test/lib/Utils which can be used in the closed part.

test/lib/jdk/test/lib/Utils.java line 980:

> 978:                         PosixFilePermissions.fromString("rwxrwxrwx"));
> 979:             }
> 980:         } else if (attr.contains("acl")) {

I like more the style as it was before:

            String perms = userOnly ? "rw-------" : "rwxrwxrwx";
            Files.setPosixFilePermissions(file, PosixFilePermissions.fromString(perms));

instead of this:

                Files.setPosixFilePermissions(file,
                        PosixFilePermissions.fromString("rwx------"));
            } else { /* Allow access to everyone */
                Files.setPosixFilePermissions(file,
                        PosixFilePermissions.fromString("rwxrwxrwx"));

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

PR: https://git.openjdk.org/jdk/pull/11029


More information about the core-libs-dev mailing list