RFR: 8344706: Compiler Implementation of Compact Source Files and Instance Main Methods [v3]
Alan Bateman
alanb at openjdk.org
Wed Apr 9 10:49:34 UTC 2025
On Mon, 7 Apr 2025 21:07:36 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:
>> This is a PR that implements JEP: Compact Source Files and Instance Main Methods. Changes include:
>> - `java.io.IO` moved to `java.lang.IO`, and no longer uses `System.console()` to implement the methods (thanks to @stuart-marks)
>> - `java. ... .IO` is no longer automatically imported in any compilation unit
>> - the feature is finalized (i.e. no longer requires `--enable-preview`)
>
> Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision:
>
> Rewrite bits about charset decoding, removing mention of "internal objects."
src/java.base/share/classes/java/lang/IO.java line 42:
> 40: * {@code System.in} into characters. The charset used for decoding is specified by the
> 41: * {@link System#getProperties stdin.encoding} property. If this property is not present,
> 42: * or if the charset it names cannot be loaded, then UTF-8 is used instead.
stdout.encoding and stdin.encoding are specified (in System.getProperties) to lead to unspecified behavior if started with either property set to a value other than UTF-8. We should work through the issues of introducing stdin.encoding as soon as we can, esp. the redirect cases and whether there is use cases for setting any of these properties on the command line.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24438#discussion_r2035104215
More information about the compiler-dev
mailing list