RFR: 8344706: Compiler Implementation of Compact Source Files and Instance Main Methods [v4]
Alan Bateman
alanb at openjdk.org
Tue Apr 22 08:37:53 UTC 2025
On Thu, 10 Apr 2025 01:03:01 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:
>
> Add clause about handling of malformed/unmappable bytes.
src/java.base/share/classes/java/io/Console.java line 151:
> 149: }
> 150:
> 151: /**
The copyright header will need to be updated on the changes to java.base as they seem to be first update to these sources in 2025.
src/java.base/share/classes/jdk/internal/misc/MethodFinder.java line 89:
> 87: if (mainMethod == null) {
> 88: //if not public method, try to lookup a non-public one
> 89: mainMethod = JLA.findMethod(cls, false, "main", String[].class);
Is there a reason why the first findMethod can't use publicOnly=false?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24438#discussion_r2053622213
PR Review Comment: https://git.openjdk.org/jdk/pull/24438#discussion_r2053620975
More information about the compiler-dev
mailing list