RFR: 8289689: (fs) Re-examine the need for normalization to Unicode Normalization Format D (macOS)
Alan Bateman
alanb at openjdk.org
Fri Oct 28 15:45:45 UTC 2022
On Thu, 27 Oct 2022 15:50:56 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
> On macOS, perform file name normalization if and only if a specific system property is set.
src/java.base/macosx/classes/sun/nio/fs/MacOSXFileSystem.java line 42:
> 40:
> 41: private static final boolean ENCODE_FILE_NAMES =
> 42: Boolean.getBoolean(PROPERTY_ENABLE_FILE_NAME_ENCODING);
APFS is the default since macOS 10.13 but I agree, it's safer to have a system property for a few releases in case anything is relying on this.
I assume you'll need to use GetPropertyAction.privilegedGetProperty so that it works when there is a security manager set.
As regards the property name then it will need to be jdk.something because it's JDK specific rather than a standard property. Maybe something like -Djdk.nio.path.useNormalizationFormD ?
-------------
PR: https://git.openjdk.org/jdk/pull/10885
More information about the nio-dev
mailing list