Re: RFR: 8361613: System.console() should only be available for interactive terminal [v3]

2025-07-14 Thread Jan Lahoda
On Mon, 14 Jul 2025 20:23:25 GMT, Naoto Sato wrote: >> In prior JDK releases, `System.console()` could return a `Console` instance >> even when the JVM was not attached to an interactive terminal. This could >> lead to confusion, particularly when input was not from a keyboard or output >> was

Re: RFR: 8359174: tools/jlink/JLink20000Packages.java timed out [v3]

2025-06-26 Thread Jan Lahoda
On Thu, 26 Jun 2025 06:16:06 GMT, Henry Jen wrote: >> Create a jar directly from the memory instead of real file, this should >> reduce the I/O overhead which likely the reason for the time out. >> The issue is not reproducible locally, and fails intermittently, so we >> simply trying to reduce

Re: RFR: 8357955: java.lang.classfile.Signature.ArrayTypeSig.of IAE not thrown for dims > 255

2025-05-28 Thread Jan Lahoda
On Wed, 28 May 2025 17:56:07 GMT, Adam Sotona wrote: > java.lang.classfile.Signature.ArrayTypeSig.of constraint check did not > include dimensions of the given component if the component is an array. > > This patch fixes the constraint check, corrects the @throws description and > adds test of

Re: RFR: 8356985: Use "stdin.encoding" in Console's read*() methods [v5]

2025-05-23 Thread Jan Lahoda
On Fri, 23 May 2025 17:18:40 GMT, Stuart Marks wrote: > > Can they even possibly do so? > > Sure, as far as I know, IntelliJ IDEA runs on its own version of the JDK, and > it can easily be invoked or modified to allow use of those modules. I took a > quick look at NetBeans and didn't see any r

Re: RFR: 8347050: Console.readLine() drops '\' when reading through JLine [v2]

2025-05-21 Thread Jan Lahoda
On Wed, 21 May 2025 07:23:07 GMT, Jan Lahoda wrote: >> JLine can do history expansion, and interpret escapes, when returning a >> value. That is not desirable when using JLine as a backend for >> Console.readLine(). >> >> This PR proposes to disable the history

Integrated: 8347050: Console.readLine() drops '\' when reading through JLine

2025-05-21 Thread Jan Lahoda
On Tue, 20 May 2025 13:07:55 GMT, Jan Lahoda wrote: > JLine can do history expansion, and interpret escapes, when returning a > value. That is not desirable when using JLine as a backend for > Console.readLine(). > > This PR proposes to disable the history expansion. This p

Re: RFR: 8347050: Console.readLine() drops '\' when reading through JLine [v2]

2025-05-21 Thread Jan Lahoda
> JLine can do history expansion, and interpret escapes, when returning a > value. That is not desirable when using JLine as a backend for > Console.readLine(). > > This PR proposes to disable the history expansion. Jan Lahoda has updated the pull request incrementally with

Re: RFR: 8354323: Safeguard SwitchBootstraps.typeSwitch when used outside the compiler [v3]

2025-05-21 Thread Jan Lahoda
On Tue, 13 May 2025 09:56:31 GMT, Aggelos Biboudis wrote: >> While the compiler does not allow invalid queries to flow into >> `SwitchBootstraps:typeSwitch`, a library user could do that and `typeSwitch` >> does not prevent such usage pattern errors resulting in erroneous evaluation. >> >> Fo

RFR: 8347050: Console.readLine() drops '\' when reading through JLine

2025-05-20 Thread Jan Lahoda
JLine can do history expansion, and interpret escapes, when returning a value. That is not desirable when using JLine as a backend for Console.readLine(). This PR proposes to disable the history expansion. - Commit messages: - Adding bug number - 8347050: Console.readLine() drops

Re: RFR: 8354556: Expand value-based class warnings to java.lang.ref API [v18]

2025-05-19 Thread Jan Lahoda
On Mon, 19 May 2025 14:35:40 GMT, Vicente Romero wrote: >> This PR is defining a new internal annotation, >> `@jdk.internal.RequiresIdentity`, with target types PARAMETER and >> TYPE_PARAMETER. The @RequiresIdentity annotation expresses the expectation >> that an argument to a given method or

Re: RFR: 8354556: Expand value-based class warnings to java.lang.ref API [v16]

2025-05-19 Thread Jan Lahoda
On Thu, 15 May 2025 22:32:12 GMT, Vicente Romero wrote: >> This PR is defining a new internal annotation, >> `@jdk.internal.RequiresIdentity`, with target types PARAMETER and >> TYPE_PARAMETER. The @RequiresIdentity annotation expresses the expectation >> that an argument to a given method or

Integrated: 8357016: Candidate main methods not computed properly

2025-05-19 Thread Jan Lahoda
On Thu, 15 May 2025 16:42:48 GMT, Jan Lahoda wrote: > A consider class like this: > > > public class TwoMains { > private static void main(String... args) {} > static void main() { > System.out.println("Should be called, but is not."); >

Re: RFR: 8357016: Candidate main methods not computed properly [v4]

2025-05-18 Thread Jan Lahoda
sable. > > It also removes the check for the `abstract` method, as that, by itself, is > not really backed by JLS, but adds a check for `abstract` class, producing a > user-friendly message is trying to invoke an instance `main` method on an > `abstract` class (which, obviousl

Re: RFR: 8357016: Candidate main methods not computed properly [v3]

2025-05-16 Thread Jan Lahoda
sable. > > It also removes the check for the `abstract` method, as that, by itself, is > not really backed by JLS, but adds a check for `abstract` class, producing a > user-friendly message is trying to invoke an instance `main` method on an > `abstract` class (which, obviousl

Re: RFR: 8357016: Candidate main methods not computed properly [v2]

2025-05-16 Thread Jan Lahoda
sable. > > It also removes the check for the `abstract` method, as that, by itself, is > not really backed by JLS, but adds a check for `abstract` class, producing a > user-friendly message is trying to invoke an instance `main` method on an > `abstract` class (which, obviousl

Re: RFR: 8357016: Candidate main methods not computed properly [v2]

2025-05-16 Thread Jan Lahoda
On Fri, 16 May 2025 10:07:36 GMT, Jaikiran Pai wrote: >> Jan Lahoda has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Adding tests as suggested. > > test/jdk/tools/launcher/Arrrghs.java line 607: > >

Re: RFR: 8357016: Candidate main methods not computed properly

2025-05-16 Thread Jan Lahoda
On Fri, 16 May 2025 10:10:17 GMT, Jaikiran Pai wrote: >> A consider class like this: >> >> >> public class TwoMains { >> private static void main(String... args) {} >> static void main() { >> System.out.println("Should be called, but is not."); >> } >> } >> >> >> The `Meth

RFR: 8357016: Candidate main methods not computed properly

2025-05-15 Thread Jan Lahoda
A consider class like this: public class TwoMains { private static void main(String... args) {} static void main() { System.out.println("Should be called, but is not."); } } The `MethodFinder` will do lookup for the `main(String[])` method, and it finds one, so does not pro

Re: RFR: 8354556: Expand value-based class warnings to java.lang.ref API [v13]

2025-05-14 Thread Jan Lahoda
On Tue, 13 May 2025 19:36:11 GMT, Vicente Romero wrote: >> This PR is defining a new internal annotation, >> `@jdk.internal.RequiresIdentity`, with target types PARAMETER and >> TYPE_PARAMETER. The @RequiresIdentity annotation expresses the expectation >> that an argument to a given method or

Re: RFR: 8354556: Expand value-based class warnings to java.lang.ref API [v13]

2025-05-14 Thread Jan Lahoda
On Tue, 13 May 2025 19:36:11 GMT, Vicente Romero wrote: >> This PR is defining a new internal annotation, >> `@jdk.internal.RequiresIdentity`, with target types PARAMETER and >> TYPE_PARAMETER. The @RequiresIdentity annotation expresses the expectation >> that an argument to a given method or

Re: RFR: 8354260: Launcher help text is wrong for -Xms

2025-05-06 Thread Jan Lahoda
On Tue, 6 May 2025 08:02:21 GMT, Christian Stein wrote: > Please review this update to synchronize the extra help text for `-Xms` with > the description given in the manpage. > > Copied from the issue: >> The launcher help text for -Xms is wrong and should be updated to match the >> manpage de

Integrated: 8344706: Implement JEP 512: Compact Source Files and Instance Main Methods

2025-05-01 Thread Jan Lahoda
On Fri, 4 Apr 2025 07:20:23 GMT, Jan Lahoda 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 @

Re: RFR: 8344706: Implement JEP 512: Compact Source Files and Instance Main Methods [v9]

2025-05-01 Thread Jan Lahoda
lly 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: Make br field private; tweaks to javadoc. - Chang

Re: RFR: 8344706: Implement JEP 512: Compact Source Files and Instance Main Methods [v8]

2025-05-01 Thread Jan Lahoda
lly 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: Updating copyright year. - Changes: - all: https://git.op

Re: RFR: 8344706: Implement JEP 512: Compact Source Files and Instance Main Methods [v7]

2025-05-01 Thread Jan Lahoda
lly imported in any compilation unit > - the feature is finalized (i.e. no longer requires `--enable-preview`) Jan Lahoda has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 38 commits: - Merge branch 'master' into finalize-c

Integrated: 8344708: Implement JEP 511: Module Import Declarations

2025-05-01 Thread Jan Lahoda
On Wed, 26 Feb 2025 13:50:52 GMT, Jan Lahoda wrote: > This is a patch to finalize the module imports feature. Please see: > https://bugs.openjdk.org/browse/JDK-8344700 This pull request has now been integrated. Changeset: 0a697f6f Author: Jan Lahoda URL: https://git.openjdk.o

Re: RFR: 8344708: Compiler Implementation of Module Import Declarations [v7]

2025-04-29 Thread Jan Lahoda
On Tue, 29 Apr 2025 10:13:39 GMT, Maurizio Cimadamore wrote: >> src/jdk.jshell/share/classes/jdk/internal/jshell/tool/Startup.java line 345: >> >>> 343: boolean hasModuleImports = source == null || >>> 344: >>> Feature.MODULE_IMPORTS.allowedInSource(s

Re: RFR: 8344708: Compiler Implementation of Module Import Declarations [v7]

2025-04-29 Thread Jan Lahoda
On Tue, 29 Apr 2025 10:23:26 GMT, Maurizio Cimadamore wrote: >> Jan Lahoda has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 13 commits: >> >> - Merge branch 'master' into JDK-8344708 >&

Re: RFR: 8344708: Compiler Implementation of Module Import Declarations [v8]

2025-04-29 Thread Jan Lahoda
> This is a patch to finalize the module imports feature. Please see: > https://bugs.openjdk.org/browse/JDK-8344700 Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision: Reflecting review feedback. - Changes: - all:

Re: RFR: 8344708: Compiler Implementation of Module Import Declarations [v7]

2025-04-28 Thread Jan Lahoda
> This is a patch to finalize the module imports feature. Please see: > https://bugs.openjdk.org/browse/JDK-8344700 Jan Lahoda has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 13 commits: - Merge branch 'master'

Re: RFR: 8344706: Implement JEP 512: Compact Source Files and Instance Main Methods [v6]

2025-04-28 Thread Jan Lahoda
lly imported in any compilation unit > - the feature is finalized (i.e. no longer requires `--enable-preview`) Jan Lahoda has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 37 commits: - Merge branch 'master' into finalize-c

Re: RFR: 8344706: Compiler Implementation of Compact Source Files and Instance Main Methods [v5]

2025-04-27 Thread Jan Lahoda
On Sun, 27 Apr 2025 09:12:47 GMT, Tatsunori Uchino wrote: >> Jan Lahoda has updated the pull request incrementally with seven additional >> commits since the last revision: >> >> - Merge remote-tracking branch 'origin/finalize-concise-source-files' into

Re: RFR: 8344706: Compiler Implementation of Compact Source Files and Instance Main Methods [v4]

2025-04-23 Thread Jan Lahoda
On Tue, 22 Apr 2025 10:14:44 GMT, Jan Lahoda wrote: >> 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:

Re: RFR: 8352642: Set zipinfo-time=false when constructing zipfs FileSystem in com.sun.tools.javac.file.JavacFileManager$ArchiveContainer for better performance [v3]

2025-04-22 Thread Jan Lahoda
On Thu, 27 Mar 2025 23:52:00 GMT, Jason Zaugg wrote: > Noting that I found `jarFsProvider` to be a useful extension point (albeit in > undocumented API) for injecting performance improvements into existing > `javac` versions (both the `zipinfo-time` change, and further changes to > defer the `

Re: RFR: 8352642: Set zipinfo-time=false when constructing zipfs FileSystem in com.sun.tools.javac.file.JavacFileManager$ArchiveContainer for better performance [v3]

2025-04-22 Thread Jan Lahoda
On Sun, 20 Apr 2025 13:01:30 GMT, Jason Zaugg wrote: >> 8352642: Set zipinfo-time=false when constructing zipfs FileSystem in >> com.sun.tools.javac.file.JavacFileManager$ArchiveContainer for better >> performance > > Jason Zaugg has updated the pull request incrementally with one additional >

Re: RFR: 8344706: Compiler Implementation of Compact Source Files and Instance Main Methods [v5]

2025-04-22 Thread Jan Lahoda
On Mon, 7 Apr 2025 17:58:45 GMT, Naoto Sato wrote: >> Jan Lahoda has updated the pull request incrementally with seven additional >> commits since the last revision: >> >> - Merge remote-tracking branch 'origin/finalize-concise-source-files' into

Re: RFR: 8344706: Compiler Implementation of Compact Source Files and Instance Main Methods [v5]

2025-04-22 Thread Jan Lahoda
On Tue, 22 Apr 2025 08:35:20 GMT, Alan Bateman wrote: >> Jan Lahoda has updated the pull request incrementally with seven additional >> commits since the last revision: >> >> - Merge remote-tracking branch 'origin/finalize-concise-source-files' into

Re: RFR: 8344706: Compiler Implementation of Compact Source Files and Instance Main Methods [v5]

2025-04-22 Thread Jan Lahoda
lly 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 seven additional commits since the last revision: - Merge remote-tracking branch 'origin/finalize-concise-source-files&

Re: RFR: 8344706: Compiler Implementation of Compact Source Files and Instance Main Methods [v4]

2025-04-22 Thread Jan Lahoda
On Tue, 22 Apr 2025 08:34:36 GMT, Alan Bateman wrote: >> 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/s

Re: RFR: 8352693: Use a simpler console reader instead of JLine for System.console() [v4]

2025-04-16 Thread Jan Lahoda
l.le` > backend with a simple escape code interpreter, that only handles a handful of > keys/codes (left/right arrow, home, end, delete, backspace, enter), and > ignores the rest. The goal is to have something simple with less surprising > behavior. Jan Lahoda has updated the pull

Re: RFR: 8344708: Compiler Implementation of Module Import Declarations [v6]

2025-04-11 Thread Jan Lahoda
> This is a patch to finalize the module imports feature. Please see: > https://bugs.openjdk.org/browse/JDK-8344700 Jan Lahoda has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/

Re: RFR: 8344706: Compiler Implementation of Compact Source Files and Instance Main Methods [v4]

2025-04-10 Thread Jan Lahoda
lly 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. -

Re: RFR: 8344708: Compiler Implementation of Module Import Declarations [v4]

2025-04-10 Thread Jan Lahoda
On Wed, 9 Apr 2025 17:52:26 GMT, Alan Bateman wrote: >> Jan Lahoda has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Reflecting review feedback - avoiding hardcoded constants. > > src/java.base/sha

Re: RFR: 8344708: Compiler Implementation of Module Import Declarations [v5]

2025-04-10 Thread Jan Lahoda
> This is a patch to finalize the module imports feature. Please see: > https://bugs.openjdk.org/browse/JDK-8344700 Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision: Reflecting review feedback: cleanup formatting in Modu

Re: RFR: 8352748: Remove com.sun.tools.classfile from the JDK [v2]

2025-04-09 Thread Jan Lahoda
On Wed, 9 Apr 2025 15:04:24 GMT, Chen Liang wrote: >> With all dependencies of com.sun.tools.classfile in the JDK converted to the >> ClassFile API, we can remove this legacy library for release 25 like how we >> removed ASM. >> >> Testing: built locally, running tier 1-3 tests >> >> Don't kn

Re: RFR: 8344706: Compiler Implementation of Compact Source Files and Instance Main Methods [v3]

2025-04-07 Thread Jan Lahoda
lly 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

Re: RFR: 8344706: Compiler Implementation of Compact Source Files and Instance Main Methods [v2]

2025-04-07 Thread Jan Lahoda
lly 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: Use local variable for System.out in print(). - Chang

RFR: 8344706: Compiler Implementation of Compact Source Files and Instance Main Methods

2025-04-07 Thread Jan Lahoda
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 compilat

Re: RFR: 8344706: Compiler Implementation of Compact Source Files and Instance Main Methods

2025-04-07 Thread Jan Lahoda
On Sat, 5 Apr 2025 00:20:29 GMT, Chen Liang 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) >> -

Re: RFR: 8352693: Use a simpler console reader instead of JLine for System.console() [v2]

2025-04-05 Thread Jan Lahoda
l.le` > backend with a simple escape code interpreter, that only handles a handful of > keys/codes (left/right arrow, home, end, delete, backspace, enter), and > ignores the rest. The goal is to have something simple with less surprising > behavior. Jan Lahoda has updated the pull r

Re: RFR: 8352693: Use a simpler console reader instead of JLine for System.console()

2025-04-05 Thread Jan Lahoda
On Thu, 27 Mar 2025 18:28:17 GMT, Naoto Sato wrote: >> The `java.io.Console` has several backends: a simple on in `java.base`, a >> more convenient one in `jdk.internal.le` (with line-reading based on JLine) >> and one for JShell. >> >> The backend based on JLine is proving to be a somewhat pr

Re: RFR: 8344708: Compiler Implementation of Module Import Declarations [v2]

2025-04-05 Thread Jan Lahoda
> This is a patch to finalize the module imports feature. Please see: > https://bugs.openjdk.org/browse/JDK-8344700 Jan Lahoda has updated the pull request incrementally with four additional commits since the last revision: - Cleanup, fixing tests. - Adjusting JShell defaults. - Fixing

Re: RFR: 8344708: Compiler Implementation of Module Import Declarations [v4]

2025-04-05 Thread Jan Lahoda
> This is a patch to finalize the module imports feature. Please see: > https://bugs.openjdk.org/browse/JDK-8344700 Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision: Reflecting review feedback - avoiding hardcoded con

Re: RFR: 8352693: Use a simpler console reader instead of JLine for System.console()

2025-04-04 Thread Jan Lahoda
On Mon, 31 Mar 2025 17:22:45 GMT, David M. Lloyd wrote: >> The `java.io.Console` has several backends: a simple on in `java.base`, a >> more convenient one in `jdk.internal.le` (with line-reading based on JLine) >> and one for JShell. >> >> The backend based on JLine is proving to be a somewha

Re: RFR: 8352693: Use a simpler console reader instead of JLine for System.console() [v2]

2025-04-03 Thread Jan Lahoda
On Thu, 3 Apr 2025 17:59:52 GMT, Jan Lahoda wrote: >> The `java.io.Console` has several backends: a simple on in `java.base`, a >> more convenient one in `jdk.internal.le` (with line-reading based on JLine) >> and one for JShell. >> >> The backend based on JLi

Re: RFR: 8352693: Use a simpler console reader instead of JLine for System.console() [v3]

2025-04-03 Thread Jan Lahoda
l.le` > backend with a simple escape code interpreter, that only handles a handful of > keys/codes (left/right arrow, home, end, delete, backspace, enter), and > ignores the rest. The goal is to have something simple with less surprising > behavior. Jan Lahoda has updated the pull req

Re: RFR: 8344708: Compiler Implementation of Module Import Declarations [v3]

2025-04-02 Thread Jan Lahoda
On Wed, 2 Apr 2025 15:23:54 GMT, Vicente Romero wrote: >> Jan Lahoda has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Fixing test. > > src/jdk.jshell/share/classes/jdk/internal/jshell/tool/Startup.java line

Re: RFR: 8344708: Compiler Implementation of Module Import Declarations [v3]

2025-03-31 Thread Jan Lahoda
> This is a patch to finalize the module imports feature. Please see: > https://bugs.openjdk.org/browse/JDK-8344700 Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision: Fixing test. - Changes: - all: https://git.openj

Re: RFR: 8352693: Use a simpler console reader instead of JLine for System.console()

2025-03-31 Thread Jan Lahoda
On Thu, 27 Mar 2025 20:48:22 GMT, Naoto Sato wrote: >> src/jdk.internal.le/share/classes/jdk/internal/console/SimpleConsoleReader.java >> line 198: >> >>> 196: >>> 197: if (it.hasNext()) { >>> 198: out.append("\n\r"); >> >> I understand this is a simple console, bu

Re: RFR: 8352693: Use a simpler console reader instead of JLine for System.console()

2025-03-31 Thread Jan Lahoda
On Mon, 31 Mar 2025 12:43:26 GMT, Magnus Ihse Bursie wrote: >> The `java.io.Console` has several backends: a simple on in `java.base`, a >> more convenient one in `jdk.internal.le` (with line-reading based on JLine) >> and one for JShell. >> >> The backend based on JLine is proving to be a som

Re: RFR: 8352693: Use a simpler console reader instead of JLine for System.console()

2025-03-26 Thread Jan Lahoda
On Wed, 26 Mar 2025 08:59:39 GMT, Alan Bateman wrote: >> The `java.io.Console` has several backends: a simple on in `java.base`, a >> more convenient one in `jdk.internal.le` (with line-reading based on JLine) >> and one for JShell. >> >> The backend based on JLine is proving to be a somewhat

Re: RFR: 8352693: Use a simpler console reader instead of JLine for System.console()

2025-03-26 Thread Jan Lahoda
On Wed, 26 Mar 2025 08:55:09 GMT, Alan Bateman wrote: > Can you coordinate with Naoto on this? There is a CSR in progress to switch > Console back to using the java.base implementation by default. Right - but that still keeps the existing JLine-based provider, and so the problems it has still

RFR: 8352693: Use a simpler console reader instead of JLine for System.console()

2025-03-26 Thread Jan Lahoda
The `java.io.Console` has several backends: a simple on in `java.base`, a more convenient one in `jdk.internal.le` (with line-reading based on JLine) and one for JShell. The backend based on JLine is proving to be a somewhat problematic - JLine is very powerful, possibly too powerful and comple

Re: RFR: 8352642: Set zipinfo-time=false when constructing zipfs FileSystem in com.sun.tools.javac.file.JavacFileManager$ArchiveContainer for better performance

2025-03-25 Thread Jan Lahoda
On Mon, 24 Mar 2025 23:15:06 GMT, Jason Zaugg wrote: >> I wonder if there's some suspicion of a particular problem in the other >> branch, or other reason to not add the flag there as well. I would expect >> the default should be to add it to both branches, unless there's a fairly >> strong re

Re: RFR: 8352642: Set zipinfo-time=false when constructing zipfs FileSystem in com.sun.tools.javac.file.JavacFileManager$ArchiveContainer for better performance

2025-03-24 Thread Jan Lahoda
On Sun, 23 Mar 2025 12:38:04 GMT, Jason Zaugg wrote: > 8352642: Set zipinfo-time=false when constructing zipfs FileSystem in > com.sun.tools.javac.file.JavacFileManager$ArchiveContainer for better > performance Good catch, thanks! Ordinarily, I would say a test is required, but I can't think

Re: RFR: 8352642: Set zipinfo-time=false when constructing zipfs FileSystem in com.sun.tools.javac.file.JavacFileManager$ArchiveContainer for better performance

2025-03-24 Thread Jan Lahoda
On Sun, 23 Mar 2025 12:41:51 GMT, Jason Zaugg wrote: >> 8352642: Set zipinfo-time=false when constructing zipfs FileSystem in >> com.sun.tools.javac.file.JavacFileManager$ArchiveContainer for better >> performance > > src/jdk.compiler/share/classes/com/sun/tools/javac/file/JavacFileManager.java

RFR: 8344708: Compiler Implementation of Module Import Declarations

2025-03-04 Thread Jan Lahoda
This is a patch to finalize the module imports feature. Please see: https://bugs.openjdk.org/browse/JDK-8344700 - Commit messages: - Cleanup. - Cleanup. - Finalizing module imports. Changes: https://git.openjdk.org/jdk/pull/23801/files Webrev: https://webrevs.openjdk.org/?repo=j

Re: RFR: 8346128: Comparison build fails due to difference in LabelTarget.html

2024-12-19 Thread Jan Lahoda
On Thu, 19 Dec 2024 16:48:33 GMT, Nizar Benalla wrote: > Please review this doc-only patch to fix an issue that causes the > cmp-baseline build to fail. > > The snippet in `LabelTrget.java` showed a highly rare non deterministism in > javadoc snippet generation, which will be fixed in > [JDK-

[jdk24] Integrated: 8344647: Make java.se participate in the preview language feature `requires transitive java.base`

2024-12-18 Thread Jan Lahoda
On Wed, 18 Dec 2024 10:00:53 GMT, Jan Lahoda wrote: > Hi all, > > This pull request contains a backport of commit > [d50b725a](https://github.com/openjdk/jdk/commit/d50b725ac0f228f5b04dd68c123c7f6b263c0d02) > from the [openjdk/jdk](https://git.openjdk.org/jdk) repository.

[jdk24] RFR: 8344647: Make java.se participate in the preview language feature `requires transitive java.base`

2024-12-18 Thread Jan Lahoda
Hi all, This pull request contains a backport of commit [d50b725a](https://github.com/openjdk/jdk/commit/d50b725ac0f228f5b04dd68c123c7f6b263c0d02) from the [openjdk/jdk](https://git.openjdk.org/jdk) repository. The commit being backported was authored by Jan Lahoda on 18 Dec 2024 and was

Integrated: 8344647: Make java.se participate in the preview language feature `requires transitive java.base`

2024-12-18 Thread Jan Lahoda
On Fri, 22 Nov 2024 13:42:32 GMT, Jan Lahoda wrote: > There is a new preview language feature, `requires transitive java.base;`. > And the `java.se` module is permitted to use the feature, without being > marked as preview (i.e. the `java.se` module participates in preview). T

Re: RFR: 8344647: Make java.se participate in the preview language feature `requires transitive java.base`

2024-12-18 Thread Jan Lahoda
On Fri, 22 Nov 2024 13:42:32 GMT, Jan Lahoda wrote: > There is a new preview language feature, `requires transitive java.base;`. > And the `java.se` module is permitted to use the feature, without being > marked as preview (i.e. the `java.se` module participates in preview). T

Re: RFR: 8268611: jar --validate should check targeted classes in MR-JAR files

2024-12-12 Thread Jan Lahoda
On Thu, 14 Nov 2024 11:57:52 GMT, Christian Stein wrote: > Please review this change ensuring all targeted classes in a MR-JAR file > should target the same or a lower classfile version. > > For example, having compiled source files with `javac` 25 without using the > `--release` option (or wi

Re: RFR: 8345327: JDK 24 RDP1 L10n resource files update

2024-12-10 Thread Jan Lahoda
On Thu, 5 Dec 2024 22:36:12 GMT, Justin Lu wrote: > Please review this PR which contains the open L10n drop changes for RDP1. > > I recommend viewing the improved diffs which are built out by Jon's tool > here: https://cr.openjdk.org/~jlu/output/. As always, I can not confirm the > correctnes

Re: RFR: 8345327: JDK 24 RDP1 L10n resource files update

2024-12-10 Thread Jan Lahoda
On Tue, 10 Dec 2024 00:05:45 GMT, Henry Jen wrote: >> Oh you're right. That's odd though. But the translations aren't wrong then. > > `每个 是\n限定的程序包名称.` > We use here, but the args format is using Chinese translation,`= > [-]<程序包>(,[-]<程序包>)*` > > Should that be consistent? Regarding `''` - p

Re: RFR: 8316804: Gracefully handle the case where --release is not specified last [v2]

2024-12-04 Thread Jan Lahoda
On Wed, 13 Nov 2024 16:08:44 GMT, Christian Stein wrote: >> Please review this change for the `jar` tool to gracefully handle the case >> where `--release` is not specified as the last arguments. >> >> Prior to this commit, operation modes `-d --describe-module` and >> `--validate` expected to

Integrated: 8340133: Add concise usage message to the java executable

2024-12-02 Thread Jan Lahoda
On Tue, 8 Oct 2024 15:28:17 GMT, Jan Lahoda wrote: > Currently, running `java` without any parameters will lead to an output that > is a full `--help`, which is over 100 lines (on my computer at least), and it > feels overwhelming. And many people might actually want to run JShell/REP

Re: RFR: 8340133: Add concise usage message to the java executable [v10]

2024-11-29 Thread Jan Lahoda
On Fri, 29 Nov 2024 17:05:45 GMT, Magnus Ihse Bursie wrote: > Shouldn't we try to promote GNU-style long options? (That is, suggest > `--version` instead of `-version`.) I was thinking of that, but shied away from it, because: the current `java` output prints to stderr; this new concise `java`

Re: RFR: 8340133: Add concise usage message to the java executable [v10]

2024-11-28 Thread Jan Lahoda
On Fri, 29 Nov 2024 07:25:23 GMT, Jan Lahoda wrote: >> Currently, running `java` without any parameters will lead to an output that >> is a full `--help`, which is over 100 lines (on my computer at least), and >> it feels overwhelming. And many people might actually want to r

Re: RFR: 8340133: Add concise usage message to the java executable [v10]

2024-11-28 Thread Jan Lahoda
s to > main class. > > where options include: > > -cp > -classpath > --class-path > A ":"-separated list of directories, JAR archives, > and ZIP archives to search for class files. > -p > --mod

RFR: 8344647: JDK-8335989 causes a bad requires flag: ACC_TRANSITIVE error for java.se

2024-11-22 Thread Jan Lahoda
There is a new preview language feature, `requires transitive java.base;`. And the `java.se` module is permitted to use the feature, without being marked as preview (i.e. the `java.se` module participates in preview). This is currently implemented by the common "participates in preview" way, by

Re: RFR: 8340133: Add concise usage message to the java executable [v9]

2024-11-19 Thread Jan Lahoda
On Mon, 18 Nov 2024 21:05:41 GMT, Magnus Ihse Bursie wrote: > I think it makes sense to include the version. I have no strong opinions on > the format. Is the extract in the PR description updated with the latest > version changes? Yes, the description is updated with the output, and I've also

Re: RFR: 8340133: Add concise usage message to the java executable [v9]

2024-11-18 Thread Jan Lahoda
On Mon, 18 Nov 2024 15:50:49 GMT, Jan Lahoda wrote: >> Currently, running `java` without any parameters will lead to an output that >> is a full `--help`, which is over 100 lines (on my computer at least), and >> it feels overwhelming. And many people might actually want to r

Re: RFR: 8340133: Add concise usage message to the java executable [v7]

2024-11-18 Thread Jan Lahoda
On Tue, 12 Nov 2024 15:34:16 GMT, Jan Lahoda wrote: >>> @AlanBateman I'd like to respectfully disagree that this was an >>> improvement. If consistency was the important objection here, maybe it >>> would have been better to update "java -help"

Re: RFR: 8340133: Add concise usage message to the java executable [v9]

2024-11-18 Thread Jan Lahoda
r both for people trying to run something, and > for people that are really looking for JShell. > > What do you think? > > Thanks! Jan Lahoda has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 14 commits: - Merge branch 'mas

Integrated: 8335991: Implement Simple Source Files and Instance Main Methods (Fourth Preview)

2024-11-14 Thread Jan Lahoda
On Wed, 30 Oct 2024 13:01:29 GMT, Jan Lahoda wrote: > This is a partial implementation of JEP 495 - adjustments of the JEP metadata > in `PreviewFeature`. There are no language changes associated with this JEP. > Changes to the `java.io.IO` class are covered by > https://github

Integrated: 8342936: Enhance java.io.IO with parameter-less println() and readln()

2024-11-14 Thread Jan Lahoda
On Thu, 24 Oct 2024 19:27:47 GMT, Jan Lahoda wrote: > This PR is simply adding parameter-less `java.io.IO.{println(),readln()}`, > with the (hopefully) obvious semantics, plus the corresponding wiring to make > those work. This may become part of JEP 495: > https://openjdk.org/je

Integrated: 8335989: Implement JEP 494: Module Import Declarations (Second Preview)

2024-11-13 Thread Jan Lahoda
On Wed, 9 Oct 2024 19:22:01 GMT, Jan Lahoda wrote: > This is a current patch for module imports declarations, second preview. At > least the JEP number and preview revision will need to be updated in > `jdk.internal.javac.PreviewFeature.Feature`, but otherwise I believe this is &

Re: RFR: 8335989: JEP 494: Implement Module Import Declarations (Second Preview) [v7]

2024-11-13 Thread Jan Lahoda
odule imports can be shadowed using on-demand > imports. So, for example, having: > > import module java.base; > import module java.desktop; > ... > List l;//ambigous > > but: > > import module java.base; > import module java.desktop; > import java.util.*; &

Re: RFR: 8340133: Add concise usage message to the java executable [v7]

2024-11-12 Thread Jan Lahoda
On Tue, 12 Nov 2024 14:04:07 GMT, Alan Bateman wrote: >> src/java.base/share/classes/sun/launcher/resources/launcher.properties line >> 241: >> >>> 239: \ -jar .jar to execute the main class of a JAR >>> archive\n\ >>> 240: \ -m [/] to execute the main class of a module\n\ >>> 241:

Re: RFR: 8340133: Add concise usage message to the java executable [v7]

2024-11-12 Thread Jan Lahoda
On Mon, 11 Nov 2024 14:23:46 GMT, Alan Bateman wrote: >> Jan Lahoda has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains 11 addi

Re: RFR: 8340133: Add concise usage message to the java executable [v7]

2024-11-12 Thread Jan Lahoda
On Tue, 12 Nov 2024 13:09:25 GMT, Jan Lahoda wrote: >> In passing, it may be better to pick "short" or "concise", right now it's a >> mix in the method and resource keys. > > The idea behind printing the short version is to identify what tool is

Re: RFR: 8340133: Add concise usage message to the java executable [v8]

2024-11-12 Thread Jan Lahoda
r both for people trying to run something, and > for people that are really looking for JShell. > > What do you think? > > Thanks! Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision: Reflecting review feedback: - using "co

Re: RFR: 8340133: Add concise usage message to the java executable [v7]

2024-11-12 Thread Jan Lahoda
On Mon, 11 Nov 2024 14:25:57 GMT, Alan Bateman wrote: >> src/java.base/share/classes/sun/launcher/LauncherHelper.java line 598: >> >>> 596: static void printConciseUsageMessage(boolean printToStderr) { >>> 597: initOutput(printToStderr); >>> 598: >>> ostream.println(SharedSe

Re: RFR: 8340133: Add concise usage message to the java executable [v7]

2024-11-11 Thread Jan Lahoda
r both for people trying to run something, and > for people that are really looking for JShell. > > What do you think? > > Thanks! Jan Lahoda has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought

Re: RFR: 8335989: JEP 494: Implement Module Import Declarations (Second Preview) [v6]

2024-11-08 Thread Jan Lahoda
odule imports can be shadowed using on-demand > imports. So, for example, having: > > import module java.base; > import module java.desktop; > ... > List l;//ambigous > > but: > > import module java.base; > import module java.desktop; > import java.util.*; &

Re: RFR: 8342936: Enhance java.io.IO with parameter-less println() and readln() [v3]

2024-11-05 Thread Jan Lahoda
On Tue, 5 Nov 2024 09:48:29 GMT, vulinh64 wrote: > My question (please don't bash me, I am new): Any chance we can set the > encoding of console? I tested on Java 23 (Windows) and the encoding is > `windows-1252` so it will not display unicode characters correctly. I believe that after https:/

Re: RFR: 8335991: Implement Simple Source Files and Instance Main Methods (Fourth Preview)

2024-11-02 Thread Jan Lahoda
On Sat, 2 Nov 2024 15:11:05 GMT, Alan Bateman wrote: >> src/java.base/share/classes/jdk/internal/javac/PreviewFeature.java line 72: >> >>> 70: //--- >>> 71: @JEP(number=495, title="Simple Source Files and Instance Main >>> Methods", status="Fourth Preview") >>> 72: IMPLI

Re: RFR: 8335989: Implement Module Import Declarations (Second Preview) [v4]

2024-10-30 Thread Jan Lahoda
On Wed, 30 Oct 2024 13:22:21 GMT, Alan Bateman wrote: >> I believe the check is already being done, right on the next line: >> https://github.com/openjdk/jdk/blob/821c514a132e809a14648ddbb56f2ffee85fd35a/src/java.base/share/classes/jdk/internal/module/ModuleInfo.java#L192 >> which leads to: >> ht

Re: RFR: 8335989: Implement Module Import Declarations (Second Preview) [v5]

2024-10-30 Thread Jan Lahoda
odule imports can be shadowed using on-demand > imports. So, for example, having: > > import module java.base; > import module java.desktop; > ... > List l;//ambigous > > but: > > import module java.base; > import module java.desktop; > import java.util.*; &

  1   2   3   4   >