On Fri, 19 Nov 2021 07:00:44 GMT, Ichiroh Takiguchi <itakigu...@openjdk.org> 
wrote:

> ncoding name COMPAT was defined for operating system encoding by JEP-400.
> https://openjdk.java.net/jeps/400
> But java does not accept "-encoding COMPAT".

src/jdk.compiler/share/classes/com/sun/tools/javac/file/BaseFileManager.java 
line 283:

> 281:                     if (enc != null) {
> 282:                         encodingName = enc;
> 283:                     }

If we updating javac and javadoc --encoding to support "COMPAT" then we should 
list this in JEP 400.

Does javadoc use doPriv already, I don't know how common it would be to run 
javadoc with a SM set. If the doPriv stays then you can avoid the cast by 
changing it to:
PrivilegedAction<String> pa = () -> System.getProperty("native.encoding");
return AccessController.doPrivileged(pa);

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

PR: https://git.openjdk.java.net/jdk/pull/6475

Reply via email to