From acobbs at openjdk.org Mon Jun 3 22:33:35 2024 From: acobbs at openjdk.org (Archie Cobbs) Date: Mon, 3 Jun 2024 22:33:35 GMT Subject: RFR: 8332314: Add window size configuration option to JavaShellToolBuilder interface In-Reply-To: References: Message-ID: On Fri, 31 May 2024 06:16:09 GMT, Jan Lahoda wrote: >> When launching JShell programmatically (i.e., from a Java program instead of the command line) for an interactive session, it's not currently possible to inform JShell what the terminal window's dimensions are. As a result, JShell defaults to 80x24 and line editing becomes almost impossible because of the scrambled screen contents unless you happen to be using an 80x24 window, which these days is very unlikely. >> >> This patch adds a new method `JavaShellToolBuilder.windowSize()` which allows passing a "hint" for the number of rows & columns. > > Sorry for belated reply. This makes sense to me. Hi @lahodaj, if you get a chance, please review the CSR [JDK-8333379](https://bugs.openjdk.org/browse/JDK-8333379) or recommend someone else who might be a good reviewer. Thanks. ------------- PR Comment: https://git.openjdk.org/jdk/pull/19226#issuecomment-2146221755 From asotona at openjdk.org Tue Jun 4 15:17:48 2024 From: asotona at openjdk.org (Adam Sotona) Date: Tue, 4 Jun 2024 15:17:48 GMT Subject: RFR: 8333086: Using Console.println is unnecessarily slow due to JLine initalization In-Reply-To: References: Message-ID: On Thu, 30 May 2024 13:50:33 GMT, Jan Lahoda wrote: > Consider these two programs: > > > public class SystemPrint { > public static void main(String... args) { > System.err.println("Hello!"); > } > } > > and: > > public class IOPrint { > public static void main(String... args) { > java.io.IO.println("Hello!"); > } > } > > > They do the same conceptual thing - write a text to the output. But, `IO.println` delegates to `Console.println`, which then delegates to a `Console` backend, and the default backend is currently based on JLine. > > The issues is that JLine takes a quite a long time to initialize, and in a program like this, JLine is not really needed - it is used to provide better editing experience when reading input, but there's no reading in these programs. > > For example, on my computer: > > $ time java -classpath /tmp SystemPrint > Hello! > > real 0m0,035s > user 0m0,019s > sys 0m0,019s > > $ time java -classpath /tmp --enable-preview IOPrint > Hello! > > real 0m0,165s > user 0m0,324s > sys 0m0,042s > > > The proposal herein is to delegate to the simpler `Console` backend from `java.base` as long as the user only uses methods that print to output, and switch to the JLine delegate when other methods (typically input) is used. Note that while technically `writer()` is a method doing output, it will force JLine initialization to avoid possible problems if the client caches the writer and uses it after switching the delegates. > > With this patch, I can get timing like this: > > $ time java --enable-preview -classpath /tmp/ IOPrint > Hello! > > real 0m0,051s > user 0m0,038s > sys 0m0,020s > > > which seems much more acceptable. > > There is also #19467, which may reduce the time further. > > A future work might focus on making JLine initialize faster, but avoiding JLine initialization in case where we don't need it seems like a good step to me in any case. It looks like a legit performance trick. ------------- Marked as reviewed by asotona (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/19479#pullrequestreview-2096720909 From naoto at openjdk.org Tue Jun 4 16:33:00 2024 From: naoto at openjdk.org (Naoto Sato) Date: Tue, 4 Jun 2024 16:33:00 GMT Subject: RFR: 8333086: Using Console.println is unnecessarily slow due to JLine initalization In-Reply-To: References: Message-ID: On Thu, 30 May 2024 13:50:33 GMT, Jan Lahoda wrote: > Consider these two programs: > > > public class SystemPrint { > public static void main(String... args) { > System.err.println("Hello!"); > } > } > > and: > > public class IOPrint { > public static void main(String... args) { > java.io.IO.println("Hello!"); > } > } > > > They do the same conceptual thing - write a text to the output. But, `IO.println` delegates to `Console.println`, which then delegates to a `Console` backend, and the default backend is currently based on JLine. > > The issues is that JLine takes a quite a long time to initialize, and in a program like this, JLine is not really needed - it is used to provide better editing experience when reading input, but there's no reading in these programs. > > For example, on my computer: > > $ time java -classpath /tmp SystemPrint > Hello! > > real 0m0,035s > user 0m0,019s > sys 0m0,019s > > $ time java -classpath /tmp --enable-preview IOPrint > Hello! > > real 0m0,165s > user 0m0,324s > sys 0m0,042s > > > The proposal herein is to delegate to the simpler `Console` backend from `java.base` as long as the user only uses methods that print to output, and switch to the JLine delegate when other methods (typically input) is used. Note that while technically `writer()` is a method doing output, it will force JLine initialization to avoid possible problems if the client caches the writer and uses it after switching the delegates. > > With this patch, I can get timing like this: > > $ time java --enable-preview -classpath /tmp/ IOPrint > Hello! > > real 0m0,051s > user 0m0,038s > sys 0m0,020s > > > which seems much more acceptable. > > There is also #19467, which may reduce the time further. > > A future work might focus on making JLine initialize faster, but avoiding JLine initialization in case where we don't need it seems like a good step to me in any case. Looks good with a minor nit. test/jdk/jdk/internal/jline/LazyJdkConsoleProvider.java line 74: > 72: ProcessBuilder builder = > 73: ProcessTools.createTestJavaProcessBuilder("--enable-preview", > 74: "-verbose:class", Better to explicitly specify `-Djdk.console=jdk.internal.le` ------------- PR Review: https://git.openjdk.org/jdk/pull/19479#pullrequestreview-2096855434 PR Review Comment: https://git.openjdk.org/jdk/pull/19479#discussion_r1626281874 From jlahoda at openjdk.org Wed Jun 5 05:59:16 2024 From: jlahoda at openjdk.org (Jan Lahoda) Date: Wed, 5 Jun 2024 05:59:16 GMT Subject: RFR: 8333086: Using Console.println is unnecessarily slow due to JLine initalization [v2] In-Reply-To: References: Message-ID: > Consider these two programs: > > > public class SystemPrint { > public static void main(String... args) { > System.err.println("Hello!"); > } > } > > and: > > public class IOPrint { > public static void main(String... args) { > java.io.IO.println("Hello!"); > } > } > > > They do the same conceptual thing - write a text to the output. But, `IO.println` delegates to `Console.println`, which then delegates to a `Console` backend, and the default backend is currently based on JLine. > > The issues is that JLine takes a quite a long time to initialize, and in a program like this, JLine is not really needed - it is used to provide better editing experience when reading input, but there's no reading in these programs. > > For example, on my computer: > > $ time java -classpath /tmp SystemPrint > Hello! > > real 0m0,035s > user 0m0,019s > sys 0m0,019s > > $ time java -classpath /tmp --enable-preview IOPrint > Hello! > > real 0m0,165s > user 0m0,324s > sys 0m0,042s > > > The proposal herein is to delegate to the simpler `Console` backend from `java.base` as long as the user only uses methods that print to output, and switch to the JLine delegate when other methods (typically input) is used. Note that while technically `writer()` is a method doing output, it will force JLine initialization to avoid possible problems if the client caches the writer and uses it after switching the delegates. > > With this patch, I can get timing like this: > > $ time java --enable-preview -classpath /tmp/ IOPrint > Hello! > > real 0m0,051s > user 0m0,038s > sys 0m0,020s > > > which seems much more acceptable. > > There is also #19467, which may reduce the time further. > > A future work might focus on making JLine initialize faster, but avoiding JLine initialization in case where we don't need it seems like a good step to me in any case. Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision: Reflecting review feedback - explicitly selecting the jdk.internal.le provider in the test. ------------- Changes: - all: https://git.openjdk.org/jdk/pull/19479/files - new: https://git.openjdk.org/jdk/pull/19479/files/9886732e..7a0c448f Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=19479&range=01 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=19479&range=00-01 Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/19479.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19479/head:pull/19479 PR: https://git.openjdk.org/jdk/pull/19479 From jlahoda at openjdk.org Wed Jun 5 12:36:33 2024 From: jlahoda at openjdk.org (Jan Lahoda) Date: Wed, 5 Jun 2024 12:36:33 GMT Subject: RFR: 8333086: Using Console.println is unnecessarily slow due to JLine initalization [v3] In-Reply-To: References: Message-ID: > Consider these two programs: > > > public class SystemPrint { > public static void main(String... args) { > System.err.println("Hello!"); > } > } > > and: > > public class IOPrint { > public static void main(String... args) { > java.io.IO.println("Hello!"); > } > } > > > They do the same conceptual thing - write a text to the output. But, `IO.println` delegates to `Console.println`, which then delegates to a `Console` backend, and the default backend is currently based on JLine. > > The issues is that JLine takes a quite a long time to initialize, and in a program like this, JLine is not really needed - it is used to provide better editing experience when reading input, but there's no reading in these programs. > > For example, on my computer: > > $ time java -classpath /tmp SystemPrint > Hello! > > real 0m0,035s > user 0m0,019s > sys 0m0,019s > > $ time java -classpath /tmp --enable-preview IOPrint > Hello! > > real 0m0,165s > user 0m0,324s > sys 0m0,042s > > > The proposal herein is to delegate to the simpler `Console` backend from `java.base` as long as the user only uses methods that print to output, and switch to the JLine delegate when other methods (typically input) is used. Note that while technically `writer()` is a method doing output, it will force JLine initialization to avoid possible problems if the client caches the writer and uses it after switching the delegates. > > With this patch, I can get timing like this: > > $ time java --enable-preview -classpath /tmp/ IOPrint > Hello! > > real 0m0,051s > user 0m0,038s > sys 0m0,020s > > > which seems much more acceptable. > > There is also #19467, which may reduce the time further. > > A future work might focus on making JLine initialize faster, but avoiding JLine initialization in case where we don't need it seems like a good step to me in any case. Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision: Correctly reflecting review feedback ------------- Changes: - all: https://git.openjdk.org/jdk/pull/19479/files - new: https://git.openjdk.org/jdk/pull/19479/files/7a0c448f..f3259793 Webrevs: - full: https://webrevs.openjdk.org/?repo=jdk&pr=19479&range=02 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=19479&range=01-02 Stats: 2 lines in 1 file changed: 1 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/19479.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19479/head:pull/19479 PR: https://git.openjdk.org/jdk/pull/19479 From jlahoda at openjdk.org Wed Jun 5 13:14:24 2024 From: jlahoda at openjdk.org (Jan Lahoda) Date: Wed, 5 Jun 2024 13:14:24 GMT Subject: RFR: 8332921: Ctrl+C does not call shutdown hooks after JLine upgrade Message-ID: Some `Terminal` implementations in JLine reset signal handlers to defaults when `nativeSignals` is set to `true`. Traditionally, this setting was `false` by default, but has been changed for JLine 3.6.0 to `true`: https://github.com/jline/jline3/pull/971 And recently was brought into the JDK via a JLine upgrade. The consequence is that shutdown handlers are no longer called on Ctrl-C, as the signal handler that runs the shutdown handlers is uninstalled is uninstalled. This patch proposes to adjust the configuration to set `false` to `nativeSignals` explicitly, on both places where we create new terminals. I was trying to create a test for this fairly hard, but I didn't find a way to write a test that would reliably fail without the patch and reliably pass with it. ------------- Commit messages: - 8332921: Ctrl+C does not call shutdown hooks after JLine upgrade Changes: https://git.openjdk.org/jdk/pull/19559/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19559&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8332921 Stats: 2 lines in 2 files changed: 1 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/19559.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19559/head:pull/19559 PR: https://git.openjdk.org/jdk/pull/19559 From asotona at openjdk.org Wed Jun 5 13:42:56 2024 From: asotona at openjdk.org (Adam Sotona) Date: Wed, 5 Jun 2024 13:42:56 GMT Subject: RFR: 8332921: Ctrl+C does not call shutdown hooks after JLine upgrade In-Reply-To: References: Message-ID: On Wed, 5 Jun 2024 13:09:01 GMT, Jan Lahoda wrote: > Some `Terminal` implementations in JLine reset signal handlers to defaults when `nativeSignals` is set to `true`. Traditionally, this setting was `false` by default, but has been changed for JLine 3.6.0 to `true`: > https://github.com/jline/jline3/pull/971 > > And recently was brought into the JDK via a JLine upgrade. The consequence is that shutdown handlers are no longer called on Ctrl-C, as the signal handler that runs the shutdown handlers is uninstalled is uninstalled. > > This patch proposes to adjust the configuration to set `false` to `nativeSignals` explicitly, on both places where we create new terminals. > > I was trying to create a test for this fairly hard, but I didn't find a way to write a test that would reliably fail without the patch and reliably pass with it. It look good to me and I can confirm it fixes the test case described in the bug. ------------- Marked as reviewed by asotona (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/19559#pullrequestreview-2099242995 From naoto at openjdk.org Wed Jun 5 17:16:56 2024 From: naoto at openjdk.org (Naoto Sato) Date: Wed, 5 Jun 2024 17:16:56 GMT Subject: RFR: 8333086: Using Console.println is unnecessarily slow due to JLine initalization [v3] In-Reply-To: References: Message-ID: On Wed, 5 Jun 2024 12:36:33 GMT, Jan Lahoda wrote: >> Consider these two programs: >> >> >> public class SystemPrint { >> public static void main(String... args) { >> System.err.println("Hello!"); >> } >> } >> >> and: >> >> public class IOPrint { >> public static void main(String... args) { >> java.io.IO.println("Hello!"); >> } >> } >> >> >> They do the same conceptual thing - write a text to the output. But, `IO.println` delegates to `Console.println`, which then delegates to a `Console` backend, and the default backend is currently based on JLine. >> >> The issues is that JLine takes a quite a long time to initialize, and in a program like this, JLine is not really needed - it is used to provide better editing experience when reading input, but there's no reading in these programs. >> >> For example, on my computer: >> >> $ time java -classpath /tmp SystemPrint >> Hello! >> >> real 0m0,035s >> user 0m0,019s >> sys 0m0,019s >> >> $ time java -classpath /tmp --enable-preview IOPrint >> Hello! >> >> real 0m0,165s >> user 0m0,324s >> sys 0m0,042s >> >> >> The proposal herein is to delegate to the simpler `Console` backend from `java.base` as long as the user only uses methods that print to output, and switch to the JLine delegate when other methods (typically input) is used. Note that while technically `writer()` is a method doing output, it will force JLine initialization to avoid possible problems if the client caches the writer and uses it after switching the delegates. >> >> With this patch, I can get timing like this: >> >> $ time java --enable-preview -classpath /tmp/ IOPrint >> Hello! >> >> real 0m0,051s >> user 0m0,038s >> sys 0m0,020s >> >> >> which seems much more acceptable. >> >> There is also #19467, which may reduce the time further. >> >> A future work might focus on making JLine initialize faster, but avoiding JLine initialization in case where we don't need it seems like a good step to me in any case. > > Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision: > > Correctly reflecting review feedback LGTM. Thanks for the changes. ------------- Marked as reviewed by naoto (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/19479#pullrequestreview-2099801902 From jlahoda at openjdk.org Wed Jun 5 17:23:02 2024 From: jlahoda at openjdk.org (Jan Lahoda) Date: Wed, 5 Jun 2024 17:23:02 GMT Subject: Integrated: 8333086: Using Console.println is unnecessarily slow due to JLine initalization In-Reply-To: References: Message-ID: On Thu, 30 May 2024 13:50:33 GMT, Jan Lahoda wrote: > Consider these two programs: > > > public class SystemPrint { > public static void main(String... args) { > System.err.println("Hello!"); > } > } > > and: > > public class IOPrint { > public static void main(String... args) { > java.io.IO.println("Hello!"); > } > } > > > They do the same conceptual thing - write a text to the output. But, `IO.println` delegates to `Console.println`, which then delegates to a `Console` backend, and the default backend is currently based on JLine. > > The issues is that JLine takes a quite a long time to initialize, and in a program like this, JLine is not really needed - it is used to provide better editing experience when reading input, but there's no reading in these programs. > > For example, on my computer: > > $ time java -classpath /tmp SystemPrint > Hello! > > real 0m0,035s > user 0m0,019s > sys 0m0,019s > > $ time java -classpath /tmp --enable-preview IOPrint > Hello! > > real 0m0,165s > user 0m0,324s > sys 0m0,042s > > > The proposal herein is to delegate to the simpler `Console` backend from `java.base` as long as the user only uses methods that print to output, and switch to the JLine delegate when other methods (typically input) is used. Note that while technically `writer()` is a method doing output, it will force JLine initialization to avoid possible problems if the client caches the writer and uses it after switching the delegates. > > With this patch, I can get timing like this: > > $ time java --enable-preview -classpath /tmp/ IOPrint > Hello! > > real 0m0,051s > user 0m0,038s > sys 0m0,020s > > > which seems much more acceptable. > > There is also #19467, which may reduce the time further. > > A future work might focus on making JLine initialize faster, but avoiding JLine initialization in case where we don't need it seems like a good step to me in any case. This pull request has now been integrated. Changeset: f7dbb98f Author: Jan Lahoda URL: https://git.openjdk.org/jdk/commit/f7dbb98fe69eb98f8544577d81550b4fd817864b Stats: 226 lines in 2 files changed: 213 ins; 1 del; 12 mod 8333086: Using Console.println is unnecessarily slow due to JLine initalization Reviewed-by: asotona, naoto ------------- PR: https://git.openjdk.org/jdk/pull/19479 From jlahoda at openjdk.org Wed Jun 5 17:29:13 2024 From: jlahoda at openjdk.org (Jan Lahoda) Date: Wed, 5 Jun 2024 17:29:13 GMT Subject: RFR: 8332921: Ctrl+C does not call shutdown hooks after JLine upgrade [v2] In-Reply-To: References: Message-ID: > Some `Terminal` implementations in JLine reset signal handlers to defaults when `nativeSignals` is set to `true`. Traditionally, this setting was `false` by default, but has been changed for JLine 3.6.0 to `true`: > https://github.com/jline/jline3/pull/971 > > And recently was brought into the JDK via a JLine upgrade. The consequence is that shutdown handlers are no longer called on Ctrl-C, as the signal handler that runs the shutdown handlers is uninstalled is uninstalled. > > This patch proposes to adjust the configuration to set `false` to `nativeSignals` explicitly, on both places where we create new terminals. > > I was trying to create a test for this fairly hard, but I didn't find a way to write a test that would reliably fail without the patch and reliably pass with it. Jan Lahoda has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits: - Merge branch 'master' into JDK-8332921 - 8332921: Ctrl+C does not call shutdown hooks after JLine upgrade ------------- Changes: https://git.openjdk.org/jdk/pull/19559/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19559&range=01 Stats: 2 lines in 2 files changed: 1 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/19559.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19559/head:pull/19559 PR: https://git.openjdk.org/jdk/pull/19559 From vromero at openjdk.org Wed Jun 5 18:14:59 2024 From: vromero at openjdk.org (Vicente Romero) Date: Wed, 5 Jun 2024 18:14:59 GMT Subject: RFR: 8332921: Ctrl+C does not call shutdown hooks after JLine upgrade [v2] In-Reply-To: References: Message-ID: On Wed, 5 Jun 2024 17:29:13 GMT, Jan Lahoda wrote: >> Some `Terminal` implementations in JLine reset signal handlers to defaults when `nativeSignals` is set to `true`. Traditionally, this setting was `false` by default, but has been changed for JLine 3.6.0 to `true`: >> https://github.com/jline/jline3/pull/971 >> >> And recently was brought into the JDK via a JLine upgrade. The consequence is that shutdown handlers are no longer called on Ctrl-C, as the signal handler that runs the shutdown handlers is uninstalled is uninstalled. >> >> This patch proposes to adjust the configuration to set `false` to `nativeSignals` explicitly, on both places where we create new terminals. >> >> I was trying to create a test for this fairly hard, but I didn't find a way to write a test that would reliably fail without the patch and reliably pass with it. > > Jan Lahoda has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains two commits: > > - Merge branch 'master' into JDK-8332921 > - 8332921: Ctrl+C does not call shutdown hooks after JLine upgrade lgtm ------------- Marked as reviewed by vromero (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/19559#pullrequestreview-2099920001 From jlahoda at openjdk.org Thu Jun 6 04:46:48 2024 From: jlahoda at openjdk.org (Jan Lahoda) Date: Thu, 6 Jun 2024 04:46:48 GMT Subject: Integrated: 8332921: Ctrl+C does not call shutdown hooks after JLine upgrade In-Reply-To: References: Message-ID: On Wed, 5 Jun 2024 13:09:01 GMT, Jan Lahoda wrote: > Some `Terminal` implementations in JLine reset signal handlers to defaults when `nativeSignals` is set to `true`. Traditionally, this setting was `false` by default, but has been changed for JLine 3.6.0 to `true`: > https://github.com/jline/jline3/pull/971 > > And recently was brought into the JDK via a JLine upgrade. The consequence is that shutdown handlers are no longer called on Ctrl-C, as the signal handler that runs the shutdown handlers is uninstalled is uninstalled. > > This patch proposes to adjust the configuration to set `false` to `nativeSignals` explicitly, on both places where we create new terminals. > > I was trying to create a test for this fairly hard, but I didn't find a way to write a test that would reliably fail without the patch and reliably pass with it. This pull request has now been integrated. Changeset: b3f540d3 Author: Jan Lahoda URL: https://git.openjdk.org/jdk/commit/b3f540d354c4a4e2f2199019a2b880a373699560 Stats: 2 lines in 2 files changed: 1 ins; 0 del; 1 mod 8332921: Ctrl+C does not call shutdown hooks after JLine upgrade Reviewed-by: asotona, vromero ------------- PR: https://git.openjdk.org/jdk/pull/19559 From hgreule at openjdk.org Thu Jun 6 16:56:53 2024 From: hgreule at openjdk.org (Hannes Greule) Date: Thu, 6 Jun 2024 16:56:53 GMT Subject: RFR: 8328536: javac - crash on unknown type referenced in yield statement [v4] In-Reply-To: References: Message-ID: > Pasting e.g. > > I m(I i, int x) { > return switch (x) { > default -> i; > }; > } > > in jshell will cause a crash if `I` is not declared already. This comes down to javac not creating an error type for the value of the (implicit) yield from the switch. > > Javac will not crash but swallow the exception, and create a file containing the command line options. > > I first thought about just checking for null of the type here https://github.com/openjdk/jdk/blob/9ca4ae3d3b746f1d75036d189ff98f02b73b948f/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java#L1640 but after a closer look, the `checkIdInternal` method seems a better fit, as it also updates the type normally. Hannes Greule has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains eight commits: - Merge branch 'master' into fix/switch-yield-unknown-type-crash # Conflicts: # test/langtools/tools/javac/recovery/AttrRecovery.java - add testcase - Don't bail out early on erroneous type, adjust tests - Merge branch 'master' into fix/switch-yield-unknown-type-crash - Merge branch 'master' into fix/switch-yield-unknown-type-crash - Merge branch 'refs/heads/master' into fix/switch-yield-unknown-type-crash - add bug id - Fix jshell crash on unknown type in switch yield ------------- Changes: https://git.openjdk.org/jdk/pull/18383/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=18383&range=03 Stats: 54 lines in 6 files changed: 47 ins; 3 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/18383.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/18383/head:pull/18383 PR: https://git.openjdk.org/jdk/pull/18383 From nbenalla at openjdk.org Fri Jun 7 09:16:13 2024 From: nbenalla at openjdk.org (Nizar Benalla) Date: Fri, 7 Jun 2024 09:16:13 GMT Subject: RFR: 8332014: since-checker - Fix @ since tags in jdk.jshell [v2] In-Reply-To: References: Message-ID: On Fri, 10 May 2024 02:25:26 GMT, Nizar Benalla wrote: >> Please review this small change that aims to make the `@since` in this module more accurate, these bugs were reported by the checker tool at #18934 >> >> -field: jdk.jshell.Snippet.SubKind:RECORD_SUBKIND >> This should have `@since` 17 as it was a Preview element in JDK 14-16 >> >> -method: java.util.List jdk.jshell.SourceCodeAnalysis.sourceToSnippets(java.lang.String) >> -method: int jdk.jshell.tool.JavaShellToolBuilder.start(java.lang.String[]) >> >> both should have `@since` 10 instead of 9 >> >> Thanks > > Nizar Benalla has updated the pull request incrementally with one additional commit since the last revision: > > update copyright year I wish to keep this open. ------------- PR Comment: https://git.openjdk.org/jdk/pull/19166#issuecomment-2154429211 From dholmes at openjdk.org Mon Jun 10 02:38:25 2024 From: dholmes at openjdk.org (David Holmes) Date: Mon, 10 Jun 2024 02:38:25 GMT Subject: RFR: 8330205: Initial troff manpage generation for JDK 24 Message-ID: Sets the version to 24/24-ea and the copyright year to 2025. Content changes related to the start of release (e.g. for removed options in java.1) are handled separately. This initial generation also picks up the unpublished changes from: - JDK-8330807: Update Manpage for obsoletion of ScavengeBeforeFullGC - JDK-8284500: Typo in Supported Named Extensions - BasicContraints - JDK-8324342: Doclet should default @since for a nested class to that of its enclosing class Thanks ------------- Commit messages: - 8330205: Initial troff manpage generation for JDK 24 Changes: https://git.openjdk.org/jdk/pull/19617/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19617&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8330205 Stats: 66 lines in 28 files changed: 12 ins; 13 del; 41 mod Patch: https://git.openjdk.org/jdk/pull/19617.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19617/head:pull/19617 PR: https://git.openjdk.org/jdk/pull/19617 From alanb at openjdk.org Mon Jun 10 07:18:11 2024 From: alanb at openjdk.org (Alan Bateman) Date: Mon, 10 Jun 2024 07:18:11 GMT Subject: RFR: 8330205: Initial troff manpage generation for JDK 24 In-Reply-To: References: Message-ID: <3hAM5el3W8wXMgyjuCGXpmRjCxld2dvHMiUbvarBPhU=.62cd1645-6bf1-4da4-b70e-70c12e6377c8@github.com> On Mon, 10 Jun 2024 02:31:00 GMT, David Holmes wrote: > Sets the version to 24/24-ea and the copyright year to 2025. > > Content changes related to the start of release (e.g. for removed options in java.1) are handled separately. > > This initial generation also picks up the unpublished changes from: > > - JDK-8330807: Update Manpage for obsoletion of ScavengeBeforeFullGC > - JDK-8284500: Typo in Supported Named Extensions - BasicContraints > - JDK-8324342: Doclet should default @since for a nested class to that of its enclosing class > > Thanks Marked as reviewed by alanb (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/19617#pullrequestreview-2106832118 From dholmes at openjdk.org Mon Jun 10 08:04:12 2024 From: dholmes at openjdk.org (David Holmes) Date: Mon, 10 Jun 2024 08:04:12 GMT Subject: RFR: 8330205: Initial troff manpage generation for JDK 24 In-Reply-To: <3hAM5el3W8wXMgyjuCGXpmRjCxld2dvHMiUbvarBPhU=.62cd1645-6bf1-4da4-b70e-70c12e6377c8@github.com> References: <3hAM5el3W8wXMgyjuCGXpmRjCxld2dvHMiUbvarBPhU=.62cd1645-6bf1-4da4-b70e-70c12e6377c8@github.com> Message-ID: On Mon, 10 Jun 2024 07:15:51 GMT, Alan Bateman wrote: >> Sets the version to 24/24-ea and the copyright year to 2025. >> >> Content changes related to the start of release (e.g. for removed options in java.1) are handled separately. >> >> This initial generation also picks up the unpublished changes from: >> >> - JDK-8330807: Update Manpage for obsoletion of ScavengeBeforeFullGC >> - JDK-8284500: Typo in Supported Named Extensions - BasicContraints >> - JDK-8324342: Doclet should default `@since` for a nested class to that of its enclosing class >> >> Thanks > > Marked as reviewed by alanb (Reviewer). Thanks for the review @AlanBateman ! ------------- PR Comment: https://git.openjdk.org/jdk/pull/19617#issuecomment-2157606095 From iris at openjdk.org Mon Jun 10 17:30:15 2024 From: iris at openjdk.org (Iris Clark) Date: Mon, 10 Jun 2024 17:30:15 GMT Subject: RFR: 8330205: Initial troff manpage generation for JDK 24 In-Reply-To: References: Message-ID: On Mon, 10 Jun 2024 02:31:00 GMT, David Holmes wrote: > Sets the version to 24/24-ea and the copyright year to 2025. > > Content changes related to the start of release (e.g. for removed options in java.1) are handled separately. > > This initial generation also picks up the unpublished changes from: > > - JDK-8330807: Update Manpage for obsoletion of ScavengeBeforeFullGC > - JDK-8284500: Typo in Supported Named Extensions - BasicContraints > - JDK-8324342: Doclet should default `@since` for a nested class to that of its enclosing class > > Thanks Marked as reviewed by iris (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/19617#pullrequestreview-2108383696 From dnguyen at openjdk.org Mon Jun 10 20:05:33 2024 From: dnguyen at openjdk.org (Damon Nguyen) Date: Mon, 10 Jun 2024 20:05:33 GMT Subject: RFR: 8333827: JDK 23 RDP1 L10n resource files update Message-ID: This issue is responsible for updating the translations of all the localize(able) resources in the JDK. Primarily, the changes between JDK 22 RDP 1 and the integration of the JDK 23 RDP 1 L10n drop will be translated. The translation tool adjusted some definitions, which causes some changes in localized files where the source file had no changes. This causes some words being reverted from localized languages to English, and some had its definitions changed. Alternatively, the diffs are viewable here and was generated using John Gibbon's diff tool for l10n: https://cr.openjdk.org/~dnguyen/output2/ ------------- Commit messages: - Review comment edits - Initial localization changes Changes: https://git.openjdk.org/jdk/pull/19609/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19609&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8333827 Stats: 239 lines in 39 files changed: 133 ins; 57 del; 49 mod Patch: https://git.openjdk.org/jdk/pull/19609.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/19609/head:pull/19609 PR: https://git.openjdk.org/jdk/pull/19609 From achung at openjdk.org Mon Jun 10 20:05:33 2024 From: achung at openjdk.org (Alisen Chung) Date: Mon, 10 Jun 2024 20:05:33 GMT Subject: RFR: 8333827: JDK 23 RDP1 L10n resource files update In-Reply-To: References: Message-ID: On Fri, 7 Jun 2024 22:46:44 GMT, Damon Nguyen wrote: > This issue is responsible for updating the translations of all the localize(able) resources in the JDK. Primarily, the changes between JDK 22 RDP 1 and the integration of the JDK 23 RDP 1 L10n drop will be translated. > > The translation tool adjusted some definitions, which causes some changes in localized files where the source file had no changes. This causes some words being reverted from localized languages to English, and some had its definitions changed. > > Alternatively, the diffs are viewable here and was generated using John Gibbon's diff tool for l10n: > https://cr.openjdk.org/~dnguyen/output2/ Just a question about the reverted translations, otherwise LGTM > The translation tool adjusted some definitions, which causes some changes in localized files where the source file had no changes. This causes some words being reverted from localized languages to English, and some had its definitions changed. Any particular reason you know that the tool had the definitions adjusted? I see some of the changes look like like command line options not being translated, but it's a bit hard to tell. Do you know if the reverted words should be translated (and possibly will be re-translated in future drops?) or should they be left untranslated? ------------- PR Review: https://git.openjdk.org/jdk/pull/19609#pullrequestreview-2105526180 PR Comment: https://git.openjdk.org/jdk/pull/19609#issuecomment-2155723513 From jlu at openjdk.org Mon Jun 10 20:05:33 2024 From: jlu at openjdk.org (Justin Lu) Date: Mon, 10 Jun 2024 20:05:33 GMT Subject: RFR: 8333827: JDK 23 RDP1 L10n resource files update In-Reply-To: References: Message-ID: <6x05vtOnVTgxlyzPvesvYR9v3NUNHNkinbbaXJtXzxU=.492b5e27-02dd-4457-a725-705a3d6be7f9@github.com> On Fri, 7 Jun 2024 22:46:44 GMT, Damon Nguyen wrote: > This issue is responsible for updating the translations of all the localize(able) resources in the JDK. Primarily, the changes between JDK 22 RDP 1 and the integration of the JDK 23 RDP 1 L10n drop will be translated. > > The translation tool adjusted some definitions, which causes some changes in localized files where the source file had no changes. This causes some words being reverted from localized languages to English, and some had its definitions changed. > > Alternatively, the diffs are viewable here and was generated using John Gibbon's diff tool for l10n: > https://cr.openjdk.org/~dnguyen/output2/ Cannot speak to the translations themselves, but in general the changes LGTM pending the comments. src/java.desktop/share/classes/sun/print/resources/serviceui_de.properties line 1: > 1: # It looks like these .properties files need to have their copyright years bumped. I believe since the original was not bumped, the translation tool did not reflect the correct year in the localized versions. src/java.desktop/share/classes/sun/print/resources/serviceui_zh_CN.properties line 66: > 64: label.size=??(&Z): > 65: label.source=??(&C): > 66: label.outputbins=????(&P)? Looks like the translation tool changed this from a colon (U+003A) to a full width colon (U+FF1A). There are l10n rules when it comes to punctuation, I am not sure if this is a result of that. It looks like the surrounding key/values are simply using (U+003A) colons. If we decide to revert this colon change, we need to also probably file a bug against the translation tool. src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/msg/XMLMessages_de.properties line 278: > 276: UndeclaredElementInContentSpec = Contentmodell des Elements "{0}" verweist auf das nicht deklarierte Element "{1}". > 277: UniqueNotationName = Deklaration f?r die Notation "{0}" ist nicht eindeutig. Ein jeweiliger Name darf nicht in mehreren Notationsdeklarationen deklariert werden. > 278: ENTITYFailedInitializeGrammar = ENTITYDatatype-Validator: Nicht erfolgreich. Initialisierungsmethode muss mit einer g?ltigen Grammatikreferenz aufgerufen werden. \t It looks like the _zh_CN_ file should also have the `\t` removed, but such changes are done by the translation tool. I think in this case, we should manually remove it, and then file a bug against the translation tool. src/jdk.jconsole/share/classes/sun/tools/jconsole/resources/messages_de.properties line 285: > 283: VIRTUAL_MACHINE=Virtuelle Maschine > 284: VM_ARGUMENTS=VM-Argumente > 285: VMINTERNAL_FRAME_ACCESSIBLE_DESCRIPTION=Innerer Frame f?r das Monitoring einer Java Virtual Machine This one-off change is consistent with the change in _src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTYResources_de.java_. src/jdk.jshell/share/classes/jdk/internal/jshell/tool/resources/l10n_de.properties line 183: > 181: jshell.fix.wrong.shortcut =Unerwartetes Zeichen nach Umschalt+Tab.\nVerwenden Sie "I" f?r automatischen Import, "V" zur Variablenerstellung oder "M" zur Methodenerstellung.\nWeitere Informationen finden Sie unter:\n/help shortcuts > 182: > 183: help.usage = Verwendung: jshell