From duke at openjdk.java.net Tue May 3 08:05:19 2022 From: duke at openjdk.java.net (Aggelos Biboudis) Date: Tue, 3 May 2022 08:05:19 GMT Subject: RFR: 8278039: Code completion not woking after some statements such as "if" or "while" In-Reply-To: References: Message-ID: <-oFB3hyXtuROmcEdIeU9O4HXEl3Wj13JIFtNThGFiNI=.e3207860-8861-46ad-8411-4c23e02187f3@github.com> On Tue, 1 Feb 2022 15:44:53 GMT, Jan Lahoda wrote: > Consider these snippets with completion: > > String s = ""; > if (s.c > > > The completion here proposes: > > char com. > > > which is clearly wrong. The reason is that when the completion searches for the deepest `Tree` at the cursor's position, it finds a tree for the synthetic/error recovery ';' for the then section of the command, rather than a tree in the condition. > > The proposed patch is to tweak the search for the deepest `Tree`, so that the tree from the if's condition is found. test/langtools/jdk/jshell/CompletionSuggestionTest.java line 779: > 777: public void testStatements() { > 778: assertEval("String s = \"\";"); > 779: assertCompletion("if (s.conta|", (Boolean) null, "contains("); The `if (s.ch|` would return only one result, [chars](https://docs.oracle.com/en/java/javase/18/docs/api/java.base/java/lang/String.html#chars())(). How about including that to show that `char` (as mentioned in the description) will not be included? ------------- PR: https://git.openjdk.java.net/jdk/pull/7308 From jlaskey at openjdk.java.net Tue May 3 09:15:23 2022 From: jlaskey at openjdk.java.net (Jim Laskey) Date: Tue, 3 May 2022 09:15:23 GMT Subject: RFR: 8278039: Code completion not woking after some statements such as "if" or "while" In-Reply-To: References: Message-ID: On Tue, 1 Feb 2022 15:44:53 GMT, Jan Lahoda wrote: > Consider these snippets with completion: > > String s = ""; > if (s.c > > > The completion here proposes: > > char com. > > > which is clearly wrong. The reason is that when the completion searches for the deepest `Tree` at the cursor's position, it finds a tree for the synthetic/error recovery ';' for the then section of the command, rather than a tree in the condition. > > The proposed patch is to tweak the search for the deepest `Tree`, so that the tree from the if's condition is found. Marked as reviewed by jlaskey (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/7308 From mbaesken at openjdk.java.net Wed May 4 12:10:39 2022 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Wed, 4 May 2022 12:10:39 GMT Subject: RFR: JDK-8285987: executing shell scripts without #! fails on Alpine linux Message-ID: A couple a tests like java/lang/ProcessBuilder/Basic.java#id0.Basic_id0 and jdk/jshell/ExternalEditorTest.java.ExternalEditorTest try to start small shell scripts without #! at the first line of the script. This fails with error=8, Exec format error when running on Alpine 3.15 . Looks like this is a known issue on musl / Alpine, see also https://www.openwall.com/lists/musl/2018/03/09/2 and https://github.com/scala-steward-org/scala-steward/issues/1374 (we see it on Alpine 3.15). ------------- Commit messages: - JDK-8285987 Changes: https://git.openjdk.java.net/jdk/pull/8535/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8535&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8285987 Stats: 35 lines in 3 files changed: 17 ins; 0 del; 18 mod Patch: https://git.openjdk.java.net/jdk/pull/8535.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8535/head:pull/8535 PR: https://git.openjdk.java.net/jdk/pull/8535 From mdoerr at openjdk.java.net Thu May 5 12:19:19 2022 From: mdoerr at openjdk.java.net (Martin Doerr) Date: Thu, 5 May 2022 12:19:19 GMT Subject: RFR: JDK-8285987: executing shell scripts without #! fails on Alpine linux In-Reply-To: References: Message-ID: On Wed, 4 May 2022 12:04:47 GMT, Matthias Baesken wrote: > A couple a tests like java/lang/ProcessBuilder/Basic.java#id0.Basic_id0 and jdk/jshell/ExternalEditorTest.java.ExternalEditorTest try to start small shell scripts without #! at the first line of the script. This fails with error=8, Exec format error when running on Alpine 3.15 . > Looks like this is a known issue on musl / Alpine, see also > https://www.openwall.com/lists/musl/2018/03/09/2 > and > https://github.com/scala-steward-org/scala-steward/issues/1374 > (we see it on Alpine 3.15). LGTM. ------------- Marked as reviewed by mdoerr (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/8535 From goetz at openjdk.java.net Thu May 5 12:28:20 2022 From: goetz at openjdk.java.net (Goetz Lindenmaier) Date: Thu, 5 May 2022 12:28:20 GMT Subject: RFR: JDK-8285987: executing shell scripts without #! fails on Alpine linux In-Reply-To: References: Message-ID: On Wed, 4 May 2022 12:04:47 GMT, Matthias Baesken wrote: > A couple a tests like java/lang/ProcessBuilder/Basic.java#id0.Basic_id0 and jdk/jshell/ExternalEditorTest.java.ExternalEditorTest try to start small shell scripts without #! at the first line of the script. This fails with error=8, Exec format error when running on Alpine 3.15 . > Looks like this is a known issue on musl / Alpine, see also > https://www.openwall.com/lists/musl/2018/03/09/2 > and > https://github.com/scala-steward-org/scala-steward/issues/1374 > (we see it on Alpine 3.15). Looks good ------------- Marked as reviewed by goetz (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/8535 From mbaesken at openjdk.java.net Thu May 5 12:49:19 2022 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Thu, 5 May 2022 12:49:19 GMT Subject: RFR: JDK-8285987: executing shell scripts without #! fails on Alpine linux In-Reply-To: References: Message-ID: On Wed, 4 May 2022 12:04:47 GMT, Matthias Baesken wrote: > A couple a tests like java/lang/ProcessBuilder/Basic.java#id0.Basic_id0 and jdk/jshell/ExternalEditorTest.java.ExternalEditorTest try to start small shell scripts without #! at the first line of the script. This fails with error=8, Exec format error when running on Alpine 3.15 . > Looks like this is a known issue on musl / Alpine, see also > https://www.openwall.com/lists/musl/2018/03/09/2 > and > https://github.com/scala-steward-org/scala-steward/issues/1374 > (we see it on Alpine 3.15). Hi Martin and Goetz, thanks for the reviews. ------------- PR: https://git.openjdk.java.net/jdk/pull/8535 From mbaesken at openjdk.java.net Thu May 5 12:49:19 2022 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Thu, 5 May 2022 12:49:19 GMT Subject: Integrated: JDK-8285987: executing shell scripts without #! fails on Alpine linux In-Reply-To: References: Message-ID: On Wed, 4 May 2022 12:04:47 GMT, Matthias Baesken wrote: > A couple a tests like java/lang/ProcessBuilder/Basic.java#id0.Basic_id0 and jdk/jshell/ExternalEditorTest.java.ExternalEditorTest try to start small shell scripts without #! at the first line of the script. This fails with error=8, Exec format error when running on Alpine 3.15 . > Looks like this is a known issue on musl / Alpine, see also > https://www.openwall.com/lists/musl/2018/03/09/2 > and > https://github.com/scala-steward-org/scala-steward/issues/1374 > (we see it on Alpine 3.15). This pull request has now been integrated. Changeset: 9d2f591e Author: Matthias Baesken URL: https://git.openjdk.java.net/jdk/commit/9d2f591e6a15dc155a8cc3b18a54456d5f9a3aa7 Stats: 35 lines in 3 files changed: 17 ins; 0 del; 18 mod 8285987: executing shell scripts without #! fails on Alpine linux Reviewed-by: mdoerr, goetz ------------- PR: https://git.openjdk.java.net/jdk/pull/8535 From alanb at openjdk.java.net Thu May 5 13:47:19 2022 From: alanb at openjdk.java.net (Alan Bateman) Date: Thu, 5 May 2022 13:47:19 GMT Subject: RFR: JDK-8285987: executing shell scripts without #! fails on Alpine linux In-Reply-To: References: Message-ID: On Wed, 4 May 2022 12:04:47 GMT, Matthias Baesken wrote: > A couple a tests like java/lang/ProcessBuilder/Basic.java#id0.Basic_id0 and jdk/jshell/ExternalEditorTest.java.ExternalEditorTest try to start small shell scripts without #! at the first line of the script. This fails with error=8, Exec format error when running on Alpine 3.15 . > Looks like this is a known issue on musl / Alpine, see also > https://www.openwall.com/lists/musl/2018/03/09/2 > and > https://github.com/scala-steward-org/scala-steward/issues/1374 > (we see it on Alpine 3.15). test/lib/jdk/test/lib/Platform.java line 192: > 190: } > 191: > 192: public static boolean isMusl() { I think this will need test/lib/TestMutuallyExclusivePlatformPredicates.java to be updated too. ------------- PR: https://git.openjdk.java.net/jdk/pull/8535 From mbaesken at openjdk.java.net Thu May 5 14:19:15 2022 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Thu, 5 May 2022 14:19:15 GMT Subject: RFR: JDK-8285987: executing shell scripts without #! fails on Alpine linux In-Reply-To: References: Message-ID: On Thu, 5 May 2022 13:43:30 GMT, Alan Bateman wrote: >> A couple a tests like java/lang/ProcessBuilder/Basic.java#id0.Basic_id0 and jdk/jshell/ExternalEditorTest.java.ExternalEditorTest try to start small shell scripts without #! at the first line of the script. This fails with error=8, Exec format error when running on Alpine 3.15 . >> Looks like this is a known issue on musl / Alpine, see also >> https://www.openwall.com/lists/musl/2018/03/09/2 >> and >> https://github.com/scala-steward-org/scala-steward/issues/1374 >> (we see it on Alpine 3.15). > > test/lib/jdk/test/lib/Platform.java line 192: > >> 190: } >> 191: >> 192: public static boolean isMusl() { > > I think this will need test/lib/TestMutuallyExclusivePlatformPredicates.java to be updated too. Hi Alan, thanks for the advice; do you think we can put it into the IGNORED group ? https://github.com/openjdk/jdk/blob/master/test/lib-test/jdk/test/lib/TestMutuallyExclusivePlatformPredicates.java#L53 ------------- PR: https://git.openjdk.java.net/jdk/pull/8535 From rriggs at openjdk.java.net Thu May 5 14:49:28 2022 From: rriggs at openjdk.java.net (Roger Riggs) Date: Thu, 5 May 2022 14:49:28 GMT Subject: RFR: JDK-8285987: executing shell scripts without #! fails on Alpine linux In-Reply-To: References: Message-ID: On Thu, 5 May 2022 14:15:30 GMT, Matthias Baesken wrote: >> test/lib/jdk/test/lib/Platform.java line 192: >> >>> 190: } >>> 191: >>> 192: public static boolean isMusl() { >> >> I think this will need test/lib/TestMutuallyExclusivePlatformPredicates.java to be updated too. > > Hi Alan, thanks for the advice; do you think we can put it into the IGNORED group ? > https://github.com/openjdk/jdk/blob/master/test/lib-test/jdk/test/lib/TestMutuallyExclusivePlatformPredicates.java#L53 Its now on the ProblemList and Created Issue: [JDK-8286191](https://bugs.openjdk.java.net/browse/JDK-8286191) Test library test failure in TestMutuallyExclusivePlatformPredicates.java ------------- PR: https://git.openjdk.java.net/jdk/pull/8535 From rriggs at openjdk.java.net Thu May 5 15:12:19 2022 From: rriggs at openjdk.java.net (Roger Riggs) Date: Thu, 5 May 2022 15:12:19 GMT Subject: RFR: JDK-8285987: executing shell scripts without #! fails on Alpine linux In-Reply-To: References: Message-ID: On Thu, 5 May 2022 14:47:22 GMT, Roger Riggs wrote: >> Hi Alan, thanks for the advice; do you think we can put it into the IGNORED group ? >> https://github.com/openjdk/jdk/blob/master/test/lib-test/jdk/test/lib/TestMutuallyExclusivePlatformPredicates.java#L53 > > Its now on the ProblemList and Created Issue: > [JDK-8286191](https://bugs.openjdk.java.net/browse/JDK-8286191) Test library test failure in TestMutuallyExclusivePlatformPredicates.java This PR also caused a test failure in ExternalEditorTest because there is no defined value for "vm.musl" used in @\requires. What test were run before integration? ------------- PR: https://git.openjdk.java.net/jdk/pull/8535 From mdoerr at openjdk.java.net Thu May 5 15:28:28 2022 From: mdoerr at openjdk.java.net (Martin Doerr) Date: Thu, 5 May 2022 15:28:28 GMT Subject: RFR: JDK-8285987: executing shell scripts without #! fails on Alpine linux In-Reply-To: References: Message-ID: <1sjCy0VTLNkGW44pGTZDld1cq-5tFNH0i-_cLjPbX3Y=.5b3b41a6-5534-4a1a-814e-0d9eb5557282@github.com> On Wed, 4 May 2022 12:04:47 GMT, Matthias Baesken wrote: > A couple a tests like java/lang/ProcessBuilder/Basic.java#id0.Basic_id0 and jdk/jshell/ExternalEditorTest.java.ExternalEditorTest try to start small shell scripts without #! at the first line of the script. This fails with error=8, Exec format error when running on Alpine 3.15 . > Looks like this is a known issue on musl / Alpine, see also > https://www.openwall.com/lists/musl/2018/03/09/2 > and > https://github.com/scala-steward-org/scala-steward/issues/1374 > (we see it on Alpine 3.15). Strange. The pre-submit tests are all green. ------------- PR: https://git.openjdk.java.net/jdk/pull/8535 From mbaesken at openjdk.java.net Thu May 5 15:34:19 2022 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Thu, 5 May 2022 15:34:19 GMT Subject: RFR: JDK-8285987: executing shell scripts without #! fails on Alpine linux In-Reply-To: <1sjCy0VTLNkGW44pGTZDld1cq-5tFNH0i-_cLjPbX3Y=.5b3b41a6-5534-4a1a-814e-0d9eb5557282@github.com> References: <1sjCy0VTLNkGW44pGTZDld1cq-5tFNH0i-_cLjPbX3Y=.5b3b41a6-5534-4a1a-814e-0d9eb5557282@github.com> Message-ID: On Thu, 5 May 2022 15:24:25 GMT, Martin Doerr wrote: > Strange. The pre-submit tests are all green. Yes sorry those seem not to cover these 2 findings. And I think I locally run by mistake only the jdk test instead of the jdk + langtools tests with my script , this will of course not show the langtools issue. The green langtools/tier1 from presubmit might not include the ExternalEditorTest . ------------- PR: https://git.openjdk.java.net/jdk/pull/8535 From mbaesken at openjdk.java.net Thu May 5 15:44:55 2022 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Thu, 5 May 2022 15:44:55 GMT Subject: RFR: JDK-8286191: misc tests fail due to JDK-8286191 Message-ID: The isMusl method had to be handled in test/lib-test/jdk/test/lib/TestMutuallyExclusivePlatformPredicates.java . Additionally, the vm.musl predicate seem not to be available in the langtools tests. ------------- Commit messages: - remove from ProblemList - Merge remote-tracking branch 'origin/master' into JDK-8286191 - JDK-8286191 Changes: https://git.openjdk.java.net/jdk/pull/8556/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8556&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8286191 Stats: 4 lines in 3 files changed: 0 ins; 3 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/8556.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8556/head:pull/8556 PR: https://git.openjdk.java.net/jdk/pull/8556 From rriggs at openjdk.java.net Thu May 5 15:51:19 2022 From: rriggs at openjdk.java.net (Roger Riggs) Date: Thu, 5 May 2022 15:51:19 GMT Subject: RFR: JDK-8286191: misc tests fail due to JDK-8286191 In-Reply-To: References: Message-ID: On Thu, 5 May 2022 15:21:23 GMT, Matthias Baesken wrote: > The isMusl method had to be handled in test/lib-test/jdk/test/lib/TestMutuallyExclusivePlatformPredicates.java . > Additionally, the vm.musl predicate seem not to be available in the langtools tests. LGTM ------------- Marked as reviewed by rriggs (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/8556 From dcubed at openjdk.java.net Thu May 5 16:18:19 2022 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Thu, 5 May 2022 16:18:19 GMT Subject: RFR: JDK-8286191: misc tests fail due to JDK-8286191 In-Reply-To: References: Message-ID: <_f5SicAf4gJF5AyC83V155aLg1JliMi0Js3vq_hw_Pc=.d5fd9cb3-9cdd-4c29-8cd6-b3299ce19b7f@github.com> On Thu, 5 May 2022 15:21:23 GMT, Matthias Baesken wrote: > The isMusl method had to be handled in test/lib-test/jdk/test/lib/TestMutuallyExclusivePlatformPredicates.java . > Additionally, the vm.musl predicate seem not to be available in the langtools tests. Changes requested by dcubed (Reviewer). test/langtools/jdk/jshell/ExternalEditorTest.java line 29: > 27: * @bug 8143955 8080843 8163816 8143006 8169828 8171130 8162989 8210808 > 28: * @comment musl/Alpine has problems executing some shell scripts, see 8285987 > 29: * @requires !vm.musl So this change backs out an "@requires" that was added by: JDK-8285987 executing shell scripts without #! fails on Alpine linux https://bugs.openjdk.java.net/browse/JDK-8285987 Presumably this "@requires" was added for some reason so what's going to happen if this test is run on Alpine Linux? Also, the fix in JDK-8285987 updated the copyright year. Do you plan on restoring it to the original "2017" value? ------------- PR: https://git.openjdk.java.net/jdk/pull/8556 From dcubed at openjdk.java.net Thu May 5 16:37:18 2022 From: dcubed at openjdk.java.net (Daniel D.Daugherty) Date: Thu, 5 May 2022 16:37:18 GMT Subject: RFR: JDK-8286191: misc tests fail due to JDK-8286191 In-Reply-To: References: Message-ID: On Thu, 5 May 2022 15:21:23 GMT, Matthias Baesken wrote: > The isMusl method had to be handled in test/lib-test/jdk/test/lib/TestMutuallyExclusivePlatformPredicates.java . > Additionally, the vm.musl predicate seem not to be available in the langtools tests. @MBaesken - I corrected a typo in my synopsis update for JDK-8286191. Please use "/issue JDK-8286191" to update the PR's synopsis. ------------- PR: https://git.openjdk.java.net/jdk/pull/8556 From mbaesken at openjdk.java.net Fri May 6 06:39:41 2022 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Fri, 6 May 2022 06:39:41 GMT Subject: RFR: 8286191: misc tests fail due to JDK-8285987 [v2] In-Reply-To: References: Message-ID: > The isMusl method had to be handled in test/lib-test/jdk/test/lib/TestMutuallyExclusivePlatformPredicates.java . > Additionally, the vm.musl predicate seem not to be available in the langtools tests. Matthias Baesken 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 four additional commits since the last revision: - Merge remote-tracking branch 'origin/master' into JDK-8286191 - remove from ProblemList - Merge remote-tracking branch 'origin/master' into JDK-8286191 - JDK-8286191 ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8556/files - new: https://git.openjdk.java.net/jdk/pull/8556/files/afdc9797..96f508df Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8556&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8556&range=00-01 Stats: 515 lines in 30 files changed: 194 ins; 107 del; 214 mod Patch: https://git.openjdk.java.net/jdk/pull/8556.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8556/head:pull/8556 PR: https://git.openjdk.java.net/jdk/pull/8556 From mbaesken at openjdk.java.net Fri May 6 06:41:31 2022 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Fri, 6 May 2022 06:41:31 GMT Subject: RFR: 8286191: misc tests fail due to JDK-8285987 [v3] In-Reply-To: References: Message-ID: <1u1FHB8_n-lQP-zR0SdH4m96CnPIMP8sFggRy2xrO30=.c35adb85-09d7-4b06-963c-c745df5930eb@github.com> > The isMusl method had to be handled in test/lib-test/jdk/test/lib/TestMutuallyExclusivePlatformPredicates.java . > Additionally, the vm.musl predicate seem not to be available in the langtools tests. Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: restore year in ExternalEditorTest, remove test exclusion ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8556/files - new: https://git.openjdk.java.net/jdk/pull/8556/files/96f508df..2337301c Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8556&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8556&range=01-02 Stats: 2 lines in 2 files changed: 0 ins; 1 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/8556.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8556/head:pull/8556 PR: https://git.openjdk.java.net/jdk/pull/8556 From mbaesken at openjdk.java.net Fri May 6 06:47:29 2022 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Fri, 6 May 2022 06:47:29 GMT Subject: RFR: 8286191: misc tests fail due to JDK-8285987 In-Reply-To: References: Message-ID: <5xL5bVm_0d6fig3F8PhzcLPBVyKxKQ47CxdBqu8UV3I=.8aceae36-4bbe-46cf-8bb1-44d3ddccf49e@github.com> On Thu, 5 May 2022 16:33:53 GMT, Daniel D. Daugherty wrote: > ... update the PR's synopsis. Done . ------------- PR: https://git.openjdk.java.net/jdk/pull/8556 From mbaesken at openjdk.java.net Fri May 6 06:47:37 2022 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Fri, 6 May 2022 06:47:37 GMT Subject: RFR: 8286191: misc tests fail due to JDK-8285987 [v3] In-Reply-To: <_f5SicAf4gJF5AyC83V155aLg1JliMi0Js3vq_hw_Pc=.d5fd9cb3-9cdd-4c29-8cd6-b3299ce19b7f@github.com> References: <_f5SicAf4gJF5AyC83V155aLg1JliMi0Js3vq_hw_Pc=.d5fd9cb3-9cdd-4c29-8cd6-b3299ce19b7f@github.com> Message-ID: On Thu, 5 May 2022 16:14:32 GMT, Daniel D. Daugherty wrote: >> Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: >> >> restore year in ExternalEditorTest, remove test exclusion > > test/langtools/jdk/jshell/ExternalEditorTest.java line 29: > >> 27: * @bug 8143955 8080843 8163816 8143006 8169828 8171130 8162989 8210808 >> 28: * @comment musl/Alpine has problems executing some shell scripts, see 8285987 >> 29: * @requires !vm.musl > > So this change backs out an "@requires" that was added by: > > JDK-8285987 executing shell scripts without #! fails on Alpine linux > https://bugs.openjdk.java.net/browse/JDK-8285987 > > Presumably this "@requires" was added for some reason so what's > going to happen if this test is run on Alpine Linux? Also, the fix in > JDK-8285987 updated the copyright year. Do you plan on restoring > it to the original "2017" value? Hi Daniel, I restored the original year 2017. (additionally I removed the langtools exclusion) > Presumably this "@requires" was added for some reason so what's going to happen if this test is run on Alpine Linux I can only speak about our Alpine setup (3.15 in a container) and there the test fails with error=8, Exec format error. Looks like something similar has been observed as well by these people https://www.openwall.com/lists/musl/2018/03/09/2 https://github.com/scala-steward-org/scala-steward/issues/1374 ------------- PR: https://git.openjdk.java.net/jdk/pull/8556 From rriggs at openjdk.java.net Fri May 6 16:37:56 2022 From: rriggs at openjdk.java.net (Roger Riggs) Date: Fri, 6 May 2022 16:37:56 GMT Subject: RFR: 8286191: misc tests fail due to JDK-8285987 [v3] In-Reply-To: <1u1FHB8_n-lQP-zR0SdH4m96CnPIMP8sFggRy2xrO30=.c35adb85-09d7-4b06-963c-c745df5930eb@github.com> References: <1u1FHB8_n-lQP-zR0SdH4m96CnPIMP8sFggRy2xrO30=.c35adb85-09d7-4b06-963c-c745df5930eb@github.com> Message-ID: On Fri, 6 May 2022 06:41:31 GMT, Matthias Baesken wrote: >> The isMusl method had to be handled in test/lib-test/jdk/test/lib/TestMutuallyExclusivePlatformPredicates.java . >> Additionally, the vm.musl predicate seem not to be available in the langtools tests. > > Matthias Baesken has updated the pull request incrementally with one additional commit since the last revision: > > restore year in ExternalEditorTest, remove test exclusion Looks good. Thanks for resolving both ProblemLists. Hopefully, the real problem and solution on Musl can be found separately. ------------- Marked as reviewed by rriggs (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/8556 From mbaesken at openjdk.java.net Tue May 10 07:46:13 2022 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Tue, 10 May 2022 07:46:13 GMT Subject: RFR: 8286191: misc tests fail due to JDK-8285987 [v4] In-Reply-To: References: Message-ID: > The isMusl method had to be handled in test/lib-test/jdk/test/lib/TestMutuallyExclusivePlatformPredicates.java . > Additionally, the vm.musl predicate seem not to be available in the langtools tests. Matthias Baesken 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 six additional commits since the last revision: - Merge remote-tracking branch 'origin/master' into JDK-8286191 - restore year in ExternalEditorTest, remove test exclusion - Merge remote-tracking branch 'origin/master' into JDK-8286191 - remove from ProblemList - Merge remote-tracking branch 'origin/master' into JDK-8286191 - JDK-8286191 ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8556/files - new: https://git.openjdk.java.net/jdk/pull/8556/files/2337301c..4c9e5b7e Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8556&range=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8556&range=02-03 Stats: 104552 lines in 1272 files changed: 94955 ins; 4519 del; 5078 mod Patch: https://git.openjdk.java.net/jdk/pull/8556.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8556/head:pull/8556 PR: https://git.openjdk.java.net/jdk/pull/8556 From mbaesken at openjdk.java.net Tue May 10 07:47:26 2022 From: mbaesken at openjdk.java.net (Matthias Baesken) Date: Tue, 10 May 2022 07:47:26 GMT Subject: Integrated: 8286191: misc tests fail due to JDK-8285987 In-Reply-To: References: Message-ID: On Thu, 5 May 2022 15:21:23 GMT, Matthias Baesken wrote: > The isMusl method had to be handled in test/lib-test/jdk/test/lib/TestMutuallyExclusivePlatformPredicates.java . > Additionally, the vm.musl predicate seem not to be available in the langtools tests. This pull request has now been integrated. Changeset: de8f4d01 Author: Matthias Baesken URL: https://git.openjdk.java.net/jdk/commit/de8f4d01b234f5224a687dae5db52ab31247c2da Stats: 6 lines in 4 files changed: 0 ins; 4 del; 2 mod 8286191: misc tests fail due to JDK-8285987 Reviewed-by: rriggs ------------- PR: https://git.openjdk.java.net/jdk/pull/8556 From jlahoda at openjdk.java.net Thu May 12 13:47:13 2022 From: jlahoda at openjdk.java.net (Jan Lahoda) Date: Thu, 12 May 2022 13:47:13 GMT Subject: RFR: 8278039: Code completion not woking after some statements such as "if" or "while" [v2] In-Reply-To: References: Message-ID: > Consider these snippets with completion: > > String s = ""; > if (s.c > > > The completion here proposes: > > char com. > > > which is clearly wrong. The reason is that when the completion searches for the deepest `Tree` at the cursor's position, it finds a tree for the synthetic/error recovery ';' for the then section of the command, rather than a tree in the condition. > > The proposed patch is to tweak the search for the deepest `Tree`, so that the tree from the if's condition is found. 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 two additional commits since the last revision: - Merge branch 'master' into JDK-8278039 - 8278039: Code completion not woking after some statements such as "if" or "while" ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7308/files - new: https://git.openjdk.java.net/jdk/pull/7308/files/396cb838..1c9c550a Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7308&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7308&range=00-01 Stats: 565091 lines in 7625 files changed: 417024 ins; 80337 del; 67730 mod Patch: https://git.openjdk.java.net/jdk/pull/7308.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7308/head:pull/7308 PR: https://git.openjdk.java.net/jdk/pull/7308 From jlahoda at openjdk.java.net Fri May 13 08:57:40 2022 From: jlahoda at openjdk.java.net (Jan Lahoda) Date: Fri, 13 May 2022 08:57:40 GMT Subject: RFR: 8278039: Code completion not woking after some statements such as "if" or "while" [v3] In-Reply-To: References: Message-ID: > Consider these snippets with completion: > > String s = ""; > if (s.c > > > The completion here proposes: > > char com. > > > which is clearly wrong. The reason is that when the completion searches for the deepest `Tree` at the cursor's position, it finds a tree for the synthetic/error recovery ';' for the then section of the command, rather than a tree in the condition. > > The proposed patch is to tweak the search for the deepest `Tree`, so that the tree from the if's condition is found. Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision: Enhancing test. ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/7308/files - new: https://git.openjdk.java.net/jdk/pull/7308/files/1c9c550a..2afda27e Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=7308&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=7308&range=01-02 Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/7308.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/7308/head:pull/7308 PR: https://git.openjdk.java.net/jdk/pull/7308 From jlahoda at openjdk.java.net Fri May 13 09:49:49 2022 From: jlahoda at openjdk.java.net (Jan Lahoda) Date: Fri, 13 May 2022 09:49:49 GMT Subject: Integrated: 8282160: JShell circularly-required classes cannot be defined In-Reply-To: References: Message-ID: On Mon, 28 Feb 2022 16:08:29 GMT, Jan Lahoda wrote: > Consider JShell snippets like: > > jshell> class B { > C c; > public void run() { > } > } > jshell> class C extends B { > public void run() { > } > } > > > When the first snippet is processed, it cannot be fully compiled, because `C` is missing. When the second snippet is processed, it is first processed separately, but it will turn out it needs `B` to be defined, and that there are no errors in `C` except resolution errors, and JShell will process both the snippets together, which will pass. > > If the second snippet is changed to: > > jshell> class C extends B { > @Override > public void run() { > } > } > > > then when processing `C`, there will be error: "method does not override or implement a method from a supertype" (in addition to the "`B` does not exist"). But that error is not considered a resolution error by JShell. > > The proposal here is to ignore the "does not override" errors and join the `C` and `B` snippet processing. An alternative would be to not produce the error when there are erroneous supertypes, but that turns out to be tricky when the error is not in the direct supertype. So the proposal is to tweak JShell for now. This pull request has now been integrated. Changeset: 11fa03f3 Author: Jan Lahoda URL: https://git.openjdk.java.net/jdk/commit/11fa03f3ee0e0224a14f6bcf88cdd92e17ed0784 Stats: 34 lines in 3 files changed: 28 ins; 0 del; 6 mod 8282160: JShell circularly-required classes cannot be defined Reviewed-by: vromero ------------- PR: https://git.openjdk.java.net/jdk/pull/7635 From jlahoda at openjdk.java.net Fri May 13 11:05:59 2022 From: jlahoda at openjdk.java.net (Jan Lahoda) Date: Fri, 13 May 2022 11:05:59 GMT Subject: Integrated: 8278039: Code completion not woking after some statements such as "if" or "while" In-Reply-To: References: Message-ID: On Tue, 1 Feb 2022 15:44:53 GMT, Jan Lahoda wrote: > Consider these snippets with completion: > > String s = ""; > if (s.c > > > The completion here proposes: > > char com. > > > which is clearly wrong. The reason is that when the completion searches for the deepest `Tree` at the cursor's position, it finds a tree for the synthetic/error recovery ';' for the then section of the command, rather than a tree in the condition. > > The proposed patch is to tweak the search for the deepest `Tree`, so that the tree from the if's condition is found. This pull request has now been integrated. Changeset: 6a1b0989 Author: Jan Lahoda URL: https://git.openjdk.java.net/jdk/commit/6a1b09898d484324a142c20c9802b95e6cdc8388 Stats: 17 lines in 2 files changed: 12 ins; 2 del; 3 mod 8278039: Code completion not woking after some statements such as "if" or "while" Reviewed-by: jlaskey ------------- PR: https://git.openjdk.java.net/jdk/pull/7308 From aivanov at openjdk.java.net Wed May 18 14:53:28 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Wed, 18 May 2022 14:53:28 GMT Subject: RFR: 8284209: Replace remaining usages of 'a the' in source code Message-ID: Replaces usages of articles that follow each other in all combinations: a/the, an?/an?, the/the? It's the last issue in the series, and it still touches different areas of the code. ------------- Commit messages: - 8284209: Replace remaining usages of 'the a' in source code - 8284209: Replace remaining usages of 'the a' in source code - 8284209: Replace remaining usages of 'the a' in source code - 8284209: Replace remaining usages of 'the the' in source code - 8284209: Replace remaining usages of 'the the' in source code - 8284209: Replace remaining usages of 'the the' in source code - 8284209: Replace remaining usages of 'the the' in source code - 8284209: Replace remaining usages of 'an? an?' in source code - 8284209: Replace remaining usages of 'a the' in source code - 8284209: Replace remaining usages of 'an the' in source code - ... and 1 more: https://git.openjdk.java.net/jdk/compare/69ff86a3...8290c07e Changes: https://git.openjdk.java.net/jdk/pull/8771/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8771&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8284209 Stats: 51 lines in 41 files changed: 0 ins; 2 del; 49 mod Patch: https://git.openjdk.java.net/jdk/pull/8771.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8771/head:pull/8771 PR: https://git.openjdk.java.net/jdk/pull/8771 From lancea at openjdk.java.net Wed May 18 14:59:56 2022 From: lancea at openjdk.java.net (Lance Andersen) Date: Wed, 18 May 2022 14:59:56 GMT Subject: RFR: 8284209: Replace remaining usages of 'a the' in source code In-Reply-To: References: Message-ID: On Wed, 18 May 2022 14:46:42 GMT, Alexey Ivanov wrote: > Replaces usages of articles that follow each other in all combinations: a/the, an?/an?, the/the? > > It's the last issue in the series, and it still touches different areas of the code. Marked as reviewed by lancea (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8771 From wetmore at openjdk.java.net Wed May 18 15:19:55 2022 From: wetmore at openjdk.java.net (Bradford Wetmore) Date: Wed, 18 May 2022 15:19:55 GMT Subject: RFR: 8284209: Replace remaining usages of 'a the' in source code In-Reply-To: References: Message-ID: On Wed, 18 May 2022 14:46:42 GMT, Alexey Ivanov wrote: > Replaces usages of articles that follow each other in all combinations: a/the, an?/an?, the/the? > > It's the last issue in the series, and it still touches different areas of the code. Looked at -java.security.jgss. LGTM ------------- Marked as reviewed by wetmore (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/8771 From dfuchs at openjdk.java.net Wed May 18 16:07:52 2022 From: dfuchs at openjdk.java.net (Daniel Fuchs) Date: Wed, 18 May 2022 16:07:52 GMT Subject: RFR: 8284209: Replace remaining usages of 'a the' in source code In-Reply-To: References: Message-ID: On Wed, 18 May 2022 14:46:42 GMT, Alexey Ivanov wrote: > Replaces usages of articles that follow each other in all combinations: a/the, an?/an?, the/the? > > It's the last issue in the series, and it still touches different areas of the code. Logging/JNDI OK ------------- Marked as reviewed by dfuchs (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/8771 From iris at openjdk.java.net Wed May 18 17:04:50 2022 From: iris at openjdk.java.net (Iris Clark) Date: Wed, 18 May 2022 17:04:50 GMT Subject: RFR: 8284209: Replace remaining usages of 'a the' in source code In-Reply-To: References: Message-ID: On Wed, 18 May 2022 14:46:42 GMT, Alexey Ivanov wrote: > Replaces usages of articles that follow each other in all combinations: a/the, an?/an?, the/the? > > It's the last issue in the series, and it still touches different areas of the code. Marked as reviewed by iris (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8771 From jjg at openjdk.java.net Wed May 18 22:06:44 2022 From: jjg at openjdk.java.net (Jonathan Gibbons) Date: Wed, 18 May 2022 22:06:44 GMT Subject: RFR: 8284209: Replace remaining usages of 'a the' in source code In-Reply-To: References: Message-ID: On Wed, 18 May 2022 14:46:42 GMT, Alexey Ivanov wrote: > Replaces usages of articles that follow each other in all combinations: a/the, an?/an?, the/the? > > It's the last issue in the series, and it still touches different areas of the code. javac and javadoc changes look OK test/langtools/tools/javac/modules/T8168854/module-info.java line 4: > 2: * @test > 3: * @bug 8168854 > 4: * @summary javac erroneously reject a service interface inner class in a provides clause FYI, this duplication was in the JBS issue summary; now fixed there. ------------- Marked as reviewed by jjg (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/8771 From ihse at openjdk.java.net Fri May 20 08:42:44 2022 From: ihse at openjdk.java.net (Magnus Ihse Bursie) Date: Fri, 20 May 2022 08:42:44 GMT Subject: RFR: 8284209: Replace remaining usages of 'a the' in source code In-Reply-To: References: Message-ID: On Wed, 18 May 2022 14:46:42 GMT, Alexey Ivanov wrote: > Replaces usages of articles that follow each other in all combinations: a/the, an?/an?, the/the? > > It's the last issue in the series, and it still touches different areas of the code. Build changes look good. Thanks for the cleanup! ------------- Marked as reviewed by ihse (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/8771 From aivanov at openjdk.java.net Mon May 23 20:46:23 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Mon, 23 May 2022 20:46:23 GMT Subject: RFR: 8284209: Replace remaining usages of 'a the' in source code [v2] In-Reply-To: References: Message-ID: <6pmdug3Hpy1LPgcb-OIdMP6XuOWpWYngOju7mFPdDV4=.a68d1c15-58a3-4ffa-b94d-a1a14666f9eb@github.com> > Replaces usages of articles that follow each other in all combinations: a/the, an?/an?, the/the? > > It's the last issue in the series, and it still touches different areas of the code. Alexey Ivanov has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 12 commits: - Merge master - 8284209: Replace remaining usages of 'the a' in source code - 8284209: Replace remaining usages of 'the a' in source code - 8284209: Replace remaining usages of 'the a' in source code - 8284209: Replace remaining usages of 'the the' in source code - 8284209: Replace remaining usages of 'the the' in source code - 8284209: Replace remaining usages of 'the the' in source code - 8284209: Replace remaining usages of 'the the' in source code - 8284209: Replace remaining usages of 'an? an?' in source code - 8284209: Replace remaining usages of 'a the' in source code - ... and 2 more: https://git.openjdk.java.net/jdk/compare/5b7d066c...fab0a4bb ------------- Changes: https://git.openjdk.java.net/jdk/pull/8771/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8771&range=01 Stats: 50 lines in 40 files changed: 0 ins; 2 del; 48 mod Patch: https://git.openjdk.java.net/jdk/pull/8771.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8771/head:pull/8771 PR: https://git.openjdk.java.net/jdk/pull/8771 From asotona at openjdk.java.net Tue May 24 07:15:16 2022 From: asotona at openjdk.java.net (Adam Sotona) Date: Tue, 24 May 2022 07:15:16 GMT Subject: RFR: 8286398: Address possibly lossy conversions in jdk.internal.le Message-ID: This patch is a part of general effort to address possibly lossy conversions in JDK before the relevant javac lint warning is enabled. Addition of explicit casts from ints to shorts is proposed here, with respect to the original library code. Please review. Thank you, Adam ------------- Commit messages: - Merge branch 'openjdk:master' into JDK-8286398 - 8286398: Address possibly lossy conversions in jdk.internal.le Changes: https://git.openjdk.java.net/jdk/pull/8862/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8862&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8286398 Stats: 6 lines in 1 file changed: 0 ins; 0 del; 6 mod Patch: https://git.openjdk.java.net/jdk/pull/8862.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8862/head:pull/8862 PR: https://git.openjdk.java.net/jdk/pull/8862 From aivanov at openjdk.java.net Tue May 24 09:52:29 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 24 May 2022 09:52:29 GMT Subject: RFR: 8284209: Replace remaining usages of 'a the' in source code [v3] In-Reply-To: References: Message-ID: > Replaces usages of articles that follow each other in all combinations: a/the, an?/an?, the/the? > > It's the last issue in the series, and it still touches different areas of the code. Alexey Ivanov has updated the pull request incrementally with one additional commit since the last revision: Update copyright to 2022 ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8771/files - new: https://git.openjdk.java.net/jdk/pull/8771/files/fab0a4bb..4d529f79 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8771&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8771&range=01-02 Stats: 24 lines in 24 files changed: 0 ins; 0 del; 24 mod Patch: https://git.openjdk.java.net/jdk/pull/8771.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8771/head:pull/8771 PR: https://git.openjdk.java.net/jdk/pull/8771 From lancea at openjdk.java.net Tue May 24 09:58:42 2022 From: lancea at openjdk.java.net (Lance Andersen) Date: Tue, 24 May 2022 09:58:42 GMT Subject: RFR: 8284209: Replace remaining usages of 'a the' in source code [v3] In-Reply-To: References: Message-ID: On Tue, 24 May 2022 09:52:29 GMT, Alexey Ivanov wrote: >> Replaces usages of articles that follow each other in all combinations: a/the, an?/an?, the/the? >> >> It's the last issue in the series, and it still touches different areas of the code. > > Alexey Ivanov has updated the pull request incrementally with one additional commit since the last revision: > > Update copyright to 2022 Marked as reviewed by lancea (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/8771 From jlahoda at openjdk.java.net Tue May 24 11:32:12 2022 From: jlahoda at openjdk.java.net (Jan Lahoda) Date: Tue, 24 May 2022 11:32:12 GMT Subject: RFR: 8286895: InternalError: Exception during analyze Message-ID: Consider code like: Number n = 0; if (!n instanceof Integer i) {} javac parses this like: Number n = 0; if ((!n) instanceof Integer i) {} This is obviously erroneous, and will report an error in `Attr`, but if this code gets to `Flow`, like in JShell, then it will split the `inits`/`uninits` of variables to the `true`/`false` inits while processing the unary negation. But, then, the `instanceof` operator will try to declare a variable, which will fail with on an assertion, as that shouldn't be done when the inits are split to `true`/`false`: Caused by: java.lang.AssertionError at jdk.compiler/com.sun.tools.javac.util.Assert.error(Assert.java:155) at jdk.compiler/com.sun.tools.javac.util.Assert.check(Assert.java:46) at jdk.compiler/com.sun.tools.javac.util.Bits.excl(Bits.java:220) at jdk.compiler/com.sun.tools.javac.comp.Flow$AssignAnalyzer.newVar(Flow.java:1883) at jdk.compiler/com.sun.tools.javac.comp.Flow$AssignAnalyzer.visitVarDef(Flow.java:2261) at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCVariableDecl.accept(JCTree.java:1027) at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49) at jdk.compiler/com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:444) at jdk.compiler/com.sun.tools.javac.comp.Flow$AssignAnalyzer.scan(Flow.java:1743) at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.visitBindingPattern(TreeScanner.java:307) at jdk.compiler/com.sun.tools.javac.comp.Flow$AssignAnalyzer.visitBindingPattern(Flow.java:2848) ... The proposed solution is to use `scanExpr` when handling the `instanceof`'s expression, which will merge the `true`/`false` inits, and let the variable be declared. ------------- Commit messages: - 8286895: InternalError: Exception during analyze Changes: https://git.openjdk.java.net/jdk/pull/8866/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8866&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8286895 Stats: 31 lines in 4 files changed: 30 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/8866.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8866/head:pull/8866 PR: https://git.openjdk.java.net/jdk/pull/8866 From aivanov at openjdk.java.net Tue May 24 20:12:09 2022 From: aivanov at openjdk.java.net (Alexey Ivanov) Date: Tue, 24 May 2022 20:12:09 GMT Subject: Integrated: 8284209: Replace remaining usages of 'a the' in source code In-Reply-To: References: Message-ID: On Wed, 18 May 2022 14:46:42 GMT, Alexey Ivanov wrote: > Replaces usages of articles that follow each other in all combinations: a/the, an?/an?, the/the? > > It's the last issue in the series, and it still touches different areas of the code. This pull request has now been integrated. Changeset: 9b7e42c0 Author: Alexey Ivanov URL: https://git.openjdk.java.net/jdk/commit/9b7e42c0f078db778dda1011d85cd92e3e4eb979 Stats: 74 lines in 40 files changed: 0 ins; 2 del; 72 mod 8284209: Replace remaining usages of 'a the' in source code Reviewed-by: lancea, wetmore, dfuchs, iris, jjg, ihse ------------- PR: https://git.openjdk.java.net/jdk/pull/8771 From jlahoda at openjdk.java.net Wed May 25 12:00:49 2022 From: jlahoda at openjdk.java.net (Jan Lahoda) Date: Wed, 25 May 2022 12:00:49 GMT Subject: RFR: 8286398: Address possibly lossy conversions in jdk.internal.le In-Reply-To: References: Message-ID: On Tue, 24 May 2022 07:07:06 GMT, Adam Sotona wrote: > This patch is a part of general effort to address possibly lossy conversions in JDK before the relevant javac lint warning is enabled. > Addition of explicit casts from ints to shorts is proposed here, with respect to the original library code. > Please review. > > Thank you, > Adam Looks reasonable. ------------- Marked as reviewed by jlahoda (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/8862 From asotona at openjdk.java.net Wed May 25 12:40:44 2022 From: asotona at openjdk.java.net (Adam Sotona) Date: Wed, 25 May 2022 12:40:44 GMT Subject: Integrated: 8286398: Address possibly lossy conversions in jdk.internal.le In-Reply-To: References: Message-ID: On Tue, 24 May 2022 07:07:06 GMT, Adam Sotona wrote: > This patch is a part of general effort to address possibly lossy conversions in JDK before the relevant javac lint warning is enabled. > Addition of explicit casts from ints to shorts is proposed here, with respect to the original library code. > Please review. > > Thank you, > Adam This pull request has now been integrated. Changeset: e534c133 Author: Adam Sotona URL: https://git.openjdk.java.net/jdk/commit/e534c133af9bcefb073a336f1fdc0dc226a9dd82 Stats: 6 lines in 1 file changed: 0 ins; 0 del; 6 mod 8286398: Address possibly lossy conversions in jdk.internal.le Reviewed-by: jlahoda ------------- PR: https://git.openjdk.java.net/jdk/pull/8862 From vromero at openjdk.java.net Fri May 27 15:45:46 2022 From: vromero at openjdk.java.net (Vicente Romero) Date: Fri, 27 May 2022 15:45:46 GMT Subject: RFR: 8286895: InternalError: Exception during analyze In-Reply-To: References: Message-ID: On Tue, 24 May 2022 11:25:10 GMT, Jan Lahoda wrote: > Consider code like: > > Number n = 0; > if (!n instanceof Integer i) {} > > javac parses this like: > > Number n = 0; > if ((!n) instanceof Integer i) {} > > > This is obviously erroneous, and will report an error in `Attr`, but if this code gets to `Flow`, like in JShell, then it will split the `inits`/`uninits` of variables to the `true`/`false` inits while processing the unary negation. But, then, the `instanceof` operator will try to declare a variable, which will fail with on an assertion, as that shouldn't be done when the inits are split to `true`/`false`: > > Caused by: java.lang.AssertionError > at jdk.compiler/com.sun.tools.javac.util.Assert.error(Assert.java:155) > at jdk.compiler/com.sun.tools.javac.util.Assert.check(Assert.java:46) > at jdk.compiler/com.sun.tools.javac.util.Bits.excl(Bits.java:220) > at jdk.compiler/com.sun.tools.javac.comp.Flow$AssignAnalyzer.newVar(Flow.java:1883) > at jdk.compiler/com.sun.tools.javac.comp.Flow$AssignAnalyzer.visitVarDef(Flow.java:2261) > at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCVariableDecl.accept(JCTree.java:1027) > at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49) > at jdk.compiler/com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:444) > at jdk.compiler/com.sun.tools.javac.comp.Flow$AssignAnalyzer.scan(Flow.java:1743) > at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.visitBindingPattern(TreeScanner.java:307) > at jdk.compiler/com.sun.tools.javac.comp.Flow$AssignAnalyzer.visitBindingPattern(Flow.java:2848) > ... > > > The proposed solution is to use `scanExpr` when handling the `instanceof`'s expression, which will merge the `true`/`false` inits, and let the variable be declared. looks good to me ------------- Marked as reviewed by vromero (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/8866 From jlahoda at openjdk.java.net Tue May 31 15:05:53 2022 From: jlahoda at openjdk.java.net (Jan Lahoda) Date: Tue, 31 May 2022 15:05:53 GMT Subject: Integrated: 8286895: InternalError: Exception during analyze In-Reply-To: References: Message-ID: On Tue, 24 May 2022 11:25:10 GMT, Jan Lahoda wrote: > Consider code like: > > Number n = 0; > if (!n instanceof Integer i) {} > > javac parses this like: > > Number n = 0; > if ((!n) instanceof Integer i) {} > > > This is obviously erroneous, and will report an error in `Attr`, but if this code gets to `Flow`, like in JShell, then it will split the `inits`/`uninits` of variables to the `true`/`false` inits while processing the unary negation. But, then, the `instanceof` operator will try to declare a variable, which will fail with on an assertion, as that shouldn't be done when the inits are split to `true`/`false`: > > Caused by: java.lang.AssertionError > at jdk.compiler/com.sun.tools.javac.util.Assert.error(Assert.java:155) > at jdk.compiler/com.sun.tools.javac.util.Assert.check(Assert.java:46) > at jdk.compiler/com.sun.tools.javac.util.Bits.excl(Bits.java:220) > at jdk.compiler/com.sun.tools.javac.comp.Flow$AssignAnalyzer.newVar(Flow.java:1883) > at jdk.compiler/com.sun.tools.javac.comp.Flow$AssignAnalyzer.visitVarDef(Flow.java:2261) > at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCVariableDecl.accept(JCTree.java:1027) > at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49) > at jdk.compiler/com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:444) > at jdk.compiler/com.sun.tools.javac.comp.Flow$AssignAnalyzer.scan(Flow.java:1743) > at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.visitBindingPattern(TreeScanner.java:307) > at jdk.compiler/com.sun.tools.javac.comp.Flow$AssignAnalyzer.visitBindingPattern(Flow.java:2848) > ... > > > The proposed solution is to use `scanExpr` when handling the `instanceof`'s expression, which will merge the `true`/`false` inits, and let the variable be declared. This pull request has now been integrated. Changeset: 171a7cdd Author: Jan Lahoda URL: https://git.openjdk.java.net/jdk/commit/171a7cdd5d44265b17541e17304e9ebed376a9fd Stats: 31 lines in 4 files changed: 30 ins; 0 del; 1 mod 8286895: InternalError: Exception during analyze Reviewed-by: vromero ------------- PR: https://git.openjdk.java.net/jdk/pull/8866