RFR: 8356606: (fs) PosixFileAttributes.permissions() implementations should return an EnumSet

Chen Liang liach at openjdk.org
Fri May 9 23:05:49 UTC 2025


On Fri, 9 May 2025 22:48:11 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

> Drop-in replacement in `sun.nio.fs.UnixFileAttributes::permissions` of `HashSet` with `EnumSet` for hopefully improved efficiency. All tests containing `PosixFileAttributes` passed.

Makes sense. This rejects usages of adding null or invalid objects, but this still abides to the specs, that the returned set can be modified and passed to create new attributes.

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

Marked as reviewed by liach (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/25162#pullrequestreview-2829850578


More information about the nio-dev mailing list