From jan.lahoda at oracle.com Wed Sep 2 15:43:52 2020 From: jan.lahoda at oracle.com (Jan Lahoda) Date: Wed, 2 Sep 2020 17:43:52 +0200 Subject: RFR 8247456: JShell: Handling of top-level final, abstract, and static modifiers In-Reply-To: <4e7344e5-751f-ae25-426f-fd831a04461f@oracle.com> References: <4e7344e5-751f-ae25-426f-fd831a04461f@oracle.com> Message-ID: Looks good to me. Jan On 05. 08. 20 20:48, Robert Field wrote: > Please review -- > > Issue: > > https://bugs.openjdk.java.net/browse/JDK-8247456 > > Webrev: > > http://cr.openjdk.java.net/~rfield/8247456v0.webrev/ > > Allows the pasting of abstract methods, by pre-corralling them. This > allows reference before defined. > > Better handling of abstract on var errors. > > Ignores "static" modifier, without annoying warning. > > Final portion handled by sealed types fix. > > -Robert > From jlahoda at openjdk.java.net Mon Sep 7 08:04:07 2020 From: jlahoda at openjdk.java.net (Jan Lahoda) Date: Mon, 7 Sep 2020 08:04:07 GMT Subject: RFR: 8250840: some tests use --enable-preview unnecessarily Message-ID: 8250840: some tests use --enable-preview unnecessarily ------------- Commit messages: - 8250840: some tests use --enable-preview unnecessarily Changes: https://git.openjdk.java.net/jdk/pull/41/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=41&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8250840 Stats: 11 lines in 6 files changed: 0 ins; 0 del; 11 mod Patch: https://git.openjdk.java.net/jdk/pull/41.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/41/head:pull/41 PR: https://git.openjdk.java.net/jdk/pull/41 From jlahoda at openjdk.java.net Mon Sep 7 11:35:05 2020 From: jlahoda at openjdk.java.net (Jan Lahoda) Date: Mon, 7 Sep 2020 11:35:05 GMT Subject: RFR: 8240658: Code completion not working for lambdas in method invocations that require type inference Message-ID: When a method invocation requires type inference, and the user is in the process of typing of a (block) lambda that is a parameter to the method invocation, javac may not, in some cases, perform the type inference, which then may lead to non working code completion in JShell (and possibly other tools). For example (in JShell): Arrays.stream(new Integer[]{1}).forEach(v -> { System.err.println(v. and press - this leads to no proposals currently, as the type of "v" is not inferred. The idea of the proposed patch is to improve the recovery in cases significant for cases where the text is being typed, and allow type inference in these cases. The type of "v" is then inferred, and the code completion works. ------------- Commit messages: - 8240658: Code completion not working for lambdas in method invocations that require type inference Changes: https://git.openjdk.java.net/jdk/pull/50/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=50&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8240658 Stats: 661 lines in 9 files changed: 625 ins; 6 del; 30 mod Patch: https://git.openjdk.java.net/jdk/pull/50.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/50/head:pull/50 PR: https://git.openjdk.java.net/jdk/pull/50 From github.com+46417962+jlahoda-jackpot at openjdk.java.net Mon Sep 7 12:50:22 2020 From: github.com+46417962+jlahoda-jackpot at openjdk.java.net (Advanced Static Source Code Analysis) Date: Mon, 7 Sep 2020 12:50:22 GMT Subject: RFR: 8240658: Code completion not working for lambdas in method invocations that require type inference In-Reply-To: References: Message-ID: On Mon, 7 Sep 2020 11:28:45 GMT, Jan Lahoda wrote: > When a method invocation requires type inference, and the user is in the process of typing of a (block) lambda that is > a parameter to the method invocation, javac may not, in some cases, perform the type inference, which then may lead to > non working code completion in JShell (and possibly other tools). For example (in JShell): > Arrays.stream(new Integer[]{1}).forEach(v -> { System.err.println(v. > > and press - this leads to no proposals currently, as the type of "v" is not inferred. > > The idea of the proposed patch is to improve the recovery in cases significant for cases where the text is being typed, > and allow type inference in these cases. The type of "v" is then inferred, and the code completion works. src/jdk.compiler/share/classes/com/sun/tools/javac/comp/AttrRecover.java line 130: > 128: lambda.body = new TreeTranslator() { > 129: @SuppressWarnings("unchecked") > 130: public T translate(T t) { Jackpot: warning: Add @Override Annotation src/jdk.compiler/share/classes/com/sun/tools/javac/comp/AttrRecover.java line 82: > 80: > 81: protected AttrRecover(Context context) { > 82: context.put(attrRepairKey, this); Jackpot: warning: Leaking this in constructor ------------- PR: https://git.openjdk.java.net/jdk/pull/50 From github.com+46417962+jlahoda-jackpot at openjdk.java.net Mon Sep 7 15:30:29 2020 From: github.com+46417962+jlahoda-jackpot at openjdk.java.net (Advanced Static Source Code Analysis) Date: Mon, 7 Sep 2020 15:30:29 GMT Subject: RFR: 8240658: Code completion not working for lambdas in method invocations that require type inference In-Reply-To: References: Message-ID: On Mon, 7 Sep 2020 11:28:45 GMT, Jan Lahoda wrote: > When a method invocation requires type inference, and the user is in the process of typing of a (block) lambda that is > a parameter to the method invocation, javac may not, in some cases, perform the type inference, which then may lead to > non working code completion in JShell (and possibly other tools). For example (in JShell): > Arrays.stream(new Integer[]{1}).forEach(v -> { System.err.println(v. > > and press - this leads to no proposals currently, as the type of "v" is not inferred. > > The idea of the proposed patch is to improve the recovery in cases significant for cases where the text is being typed, > and allow type inference in these cases. The type of "v" is then inferred, and the code completion works. test/langtools/tools/javac/api/TestGetTypeMirrorReferenceData.java line 24: > 22: */ > 23: > 24: package test; Jackpot: warning: Incorrect Package test/langtools/tools/javac/api/TestGetTypeMirrorReferenceData.java line 24: > 22: */ > 23: > 24: package test; Jackpot: warning: Incorrect Package test/langtools/tools/javac/api/TestGetTypeMirrorReferenceData.java line 30: > 28: private static void test() { > 29: Test.of(1).convert(c1 -> {Object o = c1/*getTypeMirror:DECLARED:java.lang.Integer*/;}); > 30: Test.of(1).consume(c2 -> {Object o = c2/*getTypeMirror:DECLARED:java.lang.Integer*/; return null;}); Jackpot: warning: Variable o is never read test/langtools/tools/javac/api/TestGetTypeMirrorReferenceData.java line 34: > 32: convert(0, c4 -> {Object o = c4/*getTypeMirror:DECLARED:java.lang.Integer*/;}); > 33: consume(0, c5 -> {Object o = c5/*getTypeMirror:DECLARED:java.lang.Integer*/;}); > 34: convertVarArgs(0, c6 -> {Object o = c6/*getTypeMirror:DECLARED:java.lang.Integer*/;}, 1, 2, 3, 4); Jackpot: warning: Variable o is never read test/langtools/tools/javac/api/TestGetTypeMirrorReferenceData.java line 29: > 27: > 28: private static void test() { > 29: Test.of(1).convert(c1 -> {Object o = c1/*getTypeMirror:DECLARED:java.lang.Integer*/;}); Jackpot: warning: Variable o is never read test/langtools/tools/javac/api/TestGetTypeMirrorReferenceData.java line 35: > 33: consume(0, c5 -> {Object o = c5/*getTypeMirror:DECLARED:java.lang.Integer*/;}); > 34: convertVarArgs(0, c6 -> {Object o = c6/*getTypeMirror:DECLARED:java.lang.Integer*/;}, 1, 2, 3, 4); > 35: consumeVarArgs(0, c7 -> {Object o = c7/*getTypeMirror:DECLARED:java.lang.Integer*/;}, 1, 2, 3, 4); Jackpot: warning: Variable o is never read test/langtools/tools/javac/api/TestGetTypeMirrorReferenceData.java line 33: > 31: Test.of(1).consumeWithParam(c3 -> {Object o = c3/*getTypeMirror:DECLARED:java.lang.Integer*/;}); > 32: convert(0, c4 -> {Object o = c4/*getTypeMirror:DECLARED:java.lang.Integer*/;}); > 33: consume(0, c5 -> {Object o = c5/*getTypeMirror:DECLARED:java.lang.Integer*/;}); Jackpot: warning: Variable o is never read test/langtools/tools/javac/api/TestGetTypeMirrorReferenceData.java line 32: > 30: Test.of(1).consume(c2 -> {Object o = c2/*getTypeMirror:DECLARED:java.lang.Integer*/; return null;}); > 31: Test.of(1).consumeWithParam(c3 -> {Object o = c3/*getTypeMirror:DECLARED:java.lang.Integer*/;}); > 32: convert(0, c4 -> {Object o = c4/*getTypeMirror:DECLARED:java.lang.Integer*/;}); Jackpot: warning: Variable o is never read test/langtools/tools/javac/api/TestGetTypeMirrorReferenceData.java line 28: > 26: public class TestGetTypeMirrorReferenceData { > 27: > 28: private static void test() { Jackpot: warning: test is never used test/langtools/tools/javac/api/TestGetTypeMirrorReferenceData.java line 31: > 29: Test.of(1).convert(c1 -> {Object o = c1/*getTypeMirror:DECLARED:java.lang.Integer*/;}); > 30: Test.of(1).consume(c2 -> {Object o = c2/*getTypeMirror:DECLARED:java.lang.Integer*/; return null;}); > 31: Test.of(1).consumeWithParam(c3 -> {Object o = c3/*getTypeMirror:DECLARED:java.lang.Integer*/;}); Jackpot: warning: Variable o is never read ------------- PR: https://git.openjdk.java.net/jdk/pull/50 From vromero at openjdk.java.net Tue Sep 8 16:11:45 2020 From: vromero at openjdk.java.net (Vicente Romero) Date: Tue, 8 Sep 2020 16:11:45 GMT Subject: RFR: 8250840: some tests use --enable-preview unnecessarily In-Reply-To: References: Message-ID: On Mon, 7 Sep 2020 07:58:40 GMT, Jan Lahoda wrote: > 8250840: some tests use --enable-preview unnecessarily just a minor change could be needed, there is no need for another round test/langtools/tools/javac/ConditionalExpressionResolvePending.java line 38: > 36: * @build combo.ComboTestHelper > 37: * @compile ConditionalExpressionResolvePending.java > 38: * @run main/othervm --enable-preview ConditionalExpressionResolvePending do you still need the @run main/othervm? ------------- Marked as reviewed by vromero (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/41 From jlahoda at openjdk.java.net Tue Sep 8 16:25:18 2020 From: jlahoda at openjdk.java.net (Jan Lahoda) Date: Tue, 8 Sep 2020 16:25:18 GMT Subject: RFR: 8250840: some tests use --enable-preview unnecessarily In-Reply-To: References: Message-ID: On Tue, 8 Sep 2020 16:08:20 GMT, Vicente Romero wrote: >> 8250840: some tests use --enable-preview unnecessarily > > test/langtools/tools/javac/ConditionalExpressionResolvePending.java line 38: > >> 36: * @build combo.ComboTestHelper >> 37: * @compile ConditionalExpressionResolvePending.java >> 38: * @run main/othervm --enable-preview ConditionalExpressionResolvePending > > do you still need the @run main/othervm? Yes, that's still needed. The test internally compiles some code with --enable-preview and then tries to load and run the code in a separate ClassLoader in the same VM. So --enable-preview at runtime is required. ------------- PR: https://git.openjdk.java.net/jdk/pull/41 From vromero at openjdk.java.net Tue Sep 8 16:30:49 2020 From: vromero at openjdk.java.net (Vicente Romero) Date: Tue, 8 Sep 2020 16:30:49 GMT Subject: RFR: 8250840: some tests use --enable-preview unnecessarily In-Reply-To: References: Message-ID: <1MsuYMF6TQTPDuZOB3xhQxeopb3DM4H52QHcE1YKwYQ=.c61d5618-61bf-438c-9215-3f6f51b8861d@github.com> On Tue, 8 Sep 2020 16:22:34 GMT, Jan Lahoda wrote: >> test/langtools/tools/javac/ConditionalExpressionResolvePending.java line 38: >> >>> 36: * @build combo.ComboTestHelper >>> 37: * @compile ConditionalExpressionResolvePending.java >>> 38: * @run main/othervm --enable-preview ConditionalExpressionResolvePending >> >> do you still need the @run main/othervm? > > Yes, that's still needed. The test internally compiles some code with --enable-preview and then tries to load and run > the code in a separate ClassLoader in the same VM. So --enable-preview at runtime is required. ok looks good ------------- PR: https://git.openjdk.java.net/jdk/pull/41 From jlahoda at openjdk.java.net Wed Sep 9 07:54:43 2020 From: jlahoda at openjdk.java.net (Jan Lahoda) Date: Wed, 9 Sep 2020 07:54:43 GMT Subject: Integrated: 8250840: some tests use --enable-preview unnecessarily In-Reply-To: References: Message-ID: <0YR_XSJAJmbtiZ1NZBZWm6R24LeKYJcI6lE8ORCwXPs=.974e2c65-1a20-4dd8-9ded-d8411d3b98d8@github.com> On Mon, 7 Sep 2020 07:58:40 GMT, Jan Lahoda wrote: > 8250840: some tests use --enable-preview unnecessarily This pull request has now been integrated. Changeset: c98417eb Author: Jan Lahoda URL: https://git.openjdk.java.net/jdk/commit/c98417eb Stats: 11 lines in 6 files changed: 0 ins; 0 del; 11 mod 8250840: some tests use --enable-preview unnecessarily Reviewed-by: vromero ------------- PR: https://git.openjdk.java.net/jdk/pull/41 From vromero at openjdk.java.net Wed Sep 9 17:50:16 2020 From: vromero at openjdk.java.net (Vicente Romero) Date: Wed, 9 Sep 2020 17:50:16 GMT Subject: RFR: 8240658: Code completion not working for lambdas in method invocations that require type inference In-Reply-To: References: Message-ID: On Mon, 7 Sep 2020 11:28:45 GMT, Jan Lahoda wrote: > When a method invocation requires type inference, and the user is in the process of typing of a (block) lambda that is > a parameter to the method invocation, javac may not, in some cases, perform the type inference, which then may lead to > non working code completion in JShell (and possibly other tools). For example (in JShell): > Arrays.stream(new Integer[]{1}).forEach(v -> { System.err.println(v. > > and press - this leads to no proposals currently, as the type of "v" is not inferred. > > The idea of the proposed patch is to improve the recovery in cases significant for cases where the text is being typed, > and allow type inference in these cases. The type of "v" is then inferred, and the code completion works. src/jdk.compiler/share/classes/com/sun/tools/javac/comp/AttrRecover.java line 103: > 101: if ((todo.candSym.flags() & Flags.VARARGS) == 0 && > 102: mit.args.length() > todo.candSym.type.getParameterTypes().length()) { > 103: break RECOVER; //too many actual parameters, skip question: why not covering varargs too? src/jdk.compiler/share/classes/com/sun/tools/javac/comp/AttrRecover.java line 151: > 149: } > 150: @Override > 151: public void visitClassDef(JCClassDecl tree) { just wondering, shouldn't anonymous classes be avoided too? ------------- PR: https://git.openjdk.java.net/jdk/pull/50 From jlahoda at openjdk.java.net Thu Sep 10 13:56:46 2020 From: jlahoda at openjdk.java.net (Jan Lahoda) Date: Thu, 10 Sep 2020 13:56:46 GMT Subject: RFR: 8240658: Code completion not working for lambdas in method invocations that require type inference [v2] In-Reply-To: References: Message-ID: <9kOjJIx2_i4SvMp4J7QRWvc3G3d-n4Lvw5-Di0RGqrY=.f68458ed-6194-457a-948a-74bf31f56c4e@github.com> > When a method invocation requires type inference, and the user is in the process of typing of a (block) lambda that is > a parameter to the method invocation, javac may not, in some cases, perform the type inference, which then may lead to > non working code completion in JShell (and possibly other tools). For example (in JShell): > Arrays.stream(new Integer[]{1}).forEach(v -> { System.err.println(v. > > and press - this leads to no proposals currently, as the type of "v" is not inferred. > > The idea of the proposed patch is to improve the recovery in cases significant for cases where the text is being typed, > and allow type inference in these cases. The type of "v" is then inferred, and the code completion works. 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 three additional commits since the last revision: - Improving behavior for vararg method invocations. - Merge branch 'master' into JDK-8240658 - 8240658: Code completion not working for lambdas in method invocations that require type inference ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/50/files - new: https://git.openjdk.java.net/jdk/pull/50/files/7f4e903e..32845ddb Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=50&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=50&range=00-01 Stats: 15586 lines in 549 files changed: 10380 ins; 2664 del; 2542 mod Patch: https://git.openjdk.java.net/jdk/pull/50.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/50/head:pull/50 PR: https://git.openjdk.java.net/jdk/pull/50 From jlahoda at openjdk.java.net Thu Sep 10 14:00:32 2020 From: jlahoda at openjdk.java.net (Jan Lahoda) Date: Thu, 10 Sep 2020 14:00:32 GMT Subject: RFR: 8240658: Code completion not working for lambdas in method invocations that require type inference [v2] In-Reply-To: References: Message-ID: <4naY6DWeKRTutTKmr_WA5XX8enazMYoQRPCMUXW4Xwg=.d302c33b-84d2-4d1a-8c9a-285389e23113@github.com> On Tue, 8 Sep 2020 22:54:24 GMT, Vicente Romero 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 three additional commits since >> the last revision: >> - Improving behavior for vararg method invocations. >> - Merge branch 'master' into JDK-8240658 >> - 8240658: Code completion not working for lambdas in method invocations that require type inference > > src/jdk.compiler/share/classes/com/sun/tools/javac/comp/AttrRecover.java line 151: > >> 149: } >> 150: @Override >> 151: public void visitClassDef(JCClassDecl tree) { > > just wondering, shouldn't anonymous classes be avoided too? Anonymous classes (JCNewClass) contain JCClassDecl representing the actual anonymous class, so this should avoid anonymous classes as well. > src/jdk.compiler/share/classes/com/sun/tools/javac/comp/AttrRecover.java line 103: > >> 101: if ((todo.candSym.flags() & Flags.VARARGS) == 0 && >> 102: mit.args.length() > todo.candSym.type.getParameterTypes().length()) { >> 103: break RECOVER; //too many actual parameters, skip > > question: why not covering varargs too? Note this is a case where the invoked method is not a varargs method, and there are too many actual parameters. But it is true the varags handling could be improved, which I tried to do in a recent patch (32845dd). ------------- PR: https://git.openjdk.java.net/jdk/pull/50 From vromero at openjdk.java.net Thu Sep 10 18:16:12 2020 From: vromero at openjdk.java.net (Vicente Romero) Date: Thu, 10 Sep 2020 18:16:12 GMT Subject: RFR: 8240658: Code completion not working for lambdas in method invocations that require type inference [v2] In-Reply-To: <4naY6DWeKRTutTKmr_WA5XX8enazMYoQRPCMUXW4Xwg=.d302c33b-84d2-4d1a-8c9a-285389e23113@github.com> References: <4naY6DWeKRTutTKmr_WA5XX8enazMYoQRPCMUXW4Xwg=.d302c33b-84d2-4d1a-8c9a-285389e23113@github.com> Message-ID: <6ZnZiKLaas0Eivg64_UxVfn-XFdrl1xSmbI8heoz73Q=.3a96000d-4190-4e62-9733-e02f7ccdfaa9@github.com> On Thu, 10 Sep 2020 13:58:03 GMT, Jan Lahoda wrote: >> src/jdk.compiler/share/classes/com/sun/tools/javac/comp/AttrRecover.java line 103: >> >>> 101: if ((todo.candSym.flags() & Flags.VARARGS) == 0 && >>> 102: mit.args.length() > todo.candSym.type.getParameterTypes().length()) { >>> 103: break RECOVER; //too many actual parameters, skip >> >> question: why not covering varargs too? > > Note this is a case where the invoked method is not a varargs method, and there are too many actual parameters. But it > is true the varags handling could be improved, which I tried to do in a recent patch (32845dd). I like the patch. I think it is great. My only comment would be about test: TestGetTypeMirrorReference.java which does a golden file like comparison but I understand that there are not many options. I would suggest though to place this test along with file: TestGetTypeMirrorReferenceData.java in a separate folder and add some doc to the test so that it would be easier to modify it in the future ------------- PR: https://git.openjdk.java.net/jdk/pull/50 From vromero at openjdk.java.net Thu Sep 10 18:16:11 2020 From: vromero at openjdk.java.net (Vicente Romero) Date: Thu, 10 Sep 2020 18:16:11 GMT Subject: RFR: 8240658: Code completion not working for lambdas in method invocations that require type inference [v2] In-Reply-To: <9kOjJIx2_i4SvMp4J7QRWvc3G3d-n4Lvw5-Di0RGqrY=.f68458ed-6194-457a-948a-74bf31f56c4e@github.com> References: <9kOjJIx2_i4SvMp4J7QRWvc3G3d-n4Lvw5-Di0RGqrY=.f68458ed-6194-457a-948a-74bf31f56c4e@github.com> Message-ID: On Thu, 10 Sep 2020 13:56:46 GMT, Jan Lahoda wrote: >> When a method invocation requires type inference, and the user is in the process of typing of a (block) lambda that is >> a parameter to the method invocation, javac may not, in some cases, perform the type inference, which then may lead to >> non working code completion in JShell (and possibly other tools). For example (in JShell): >> Arrays.stream(new Integer[]{1}).forEach(v -> { System.err.println(v. >> >> and press - this leads to no proposals currently, as the type of "v" is not inferred. >> >> The idea of the proposed patch is to improve the recovery in cases significant for cases where the text is being typed, >> and allow type inference in these cases. The type of "v" is then inferred, and the code completion works. > > 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 three additional commits since > the last revision: > - Improving behavior for vararg method invocations. > - Merge branch 'master' into JDK-8240658 > - 8240658: Code completion not working for lambdas in method invocations that require type inference Marked as reviewed by vromero (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/50 From robert.field at oracle.com Thu Sep 10 23:24:39 2020 From: robert.field at oracle.com (Robert Field) Date: Thu, 10 Sep 2020 16:24:39 -0700 Subject: RFR: 8240658: Code completion not working for lambdas in method invocations that require type inference In-Reply-To: References: Message-ID: <7403e36e-0b05-5159-1315-569ef7694e04@oracle.com> The code changes are in the javac code, so an active compiler team member would be the appropriate review. The jshell test looks good. Thanks for addressing this, Robert On 2020-09-07 04:35, Jan Lahoda wrote: > When a method invocation requires type inference, and the user is in the process of typing of a (block) lambda that is > a parameter to the method invocation, javac may not, in some cases, perform the type inference, which then may lead to > non working code completion in JShell (and possibly other tools). > > For example (in JShell): > Arrays.stream(new Integer[]{1}).forEach(v -> { System.err.println(v. > > and press - this leads to no proposals currently, as the type of "v" is not inferred. > > The idea of the proposed patch is to improve the recovery in cases significant for cases where the text is being typed, > and allow type inference in these cases. The type of "v" is then inferred, and the code completion works. > > ------------- > > Commit messages: > - 8240658: Code completion not working for lambdas in method invocations that require type inference > > Changes: https://git.openjdk.java.net/jdk/pull/50/files > Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=50&range=00 > Issue: https://bugs.openjdk.java.net/browse/JDK-8240658 > Stats: 661 lines in 9 files changed: 625 ins; 6 del; 30 mod > Patch: https://git.openjdk.java.net/jdk/pull/50.diff > Fetch: git fetch https://git.openjdk.java.net/jdk pull/50/head:pull/50 > > PR: https://git.openjdk.java.net/jdk/pull/50 From jlahoda at openjdk.java.net Fri Sep 11 13:51:21 2020 From: jlahoda at openjdk.java.net (Jan Lahoda) Date: Fri, 11 Sep 2020 13:51:21 GMT Subject: RFR: 8240658: Code completion not working for lambdas in method invocations that require type inference [v3] In-Reply-To: References: Message-ID: > When a method invocation requires type inference, and the user is in the process of typing of a (block) lambda that is > a parameter to the method invocation, javac may not, in some cases, perform the type inference, which then may lead to > non working code completion in JShell (and possibly other tools). For example (in JShell): > Arrays.stream(new Integer[]{1}).forEach(v -> { System.err.println(v. > > and press - this leads to no proposals currently, as the type of "v" is not inferred. > > The idea of the proposed patch is to improve the recovery in cases significant for cases where the text is being typed, > and allow type inference in these cases. The type of "v" is then inferred, and the code completion works. Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision: Moving the TestGetTypeMirrorReference test into a separate folder. ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/50/files - new: https://git.openjdk.java.net/jdk/pull/50/files/32845ddb..988f85be Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=50&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=50&range=01-02 Stats: 15 lines in 2 files changed: 14 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/50.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/50/head:pull/50 PR: https://git.openjdk.java.net/jdk/pull/50 From jlahoda at openjdk.java.net Fri Sep 11 13:56:59 2020 From: jlahoda at openjdk.java.net (Jan Lahoda) Date: Fri, 11 Sep 2020 13:56:59 GMT Subject: RFR: 8240658: Code completion not working for lambdas in method invocations that require type inference [v3] In-Reply-To: <6ZnZiKLaas0Eivg64_UxVfn-XFdrl1xSmbI8heoz73Q=.3a96000d-4190-4e62-9733-e02f7ccdfaa9@github.com> References: <4naY6DWeKRTutTKmr_WA5XX8enazMYoQRPCMUXW4Xwg=.d302c33b-84d2-4d1a-8c9a-285389e23113@github.com> <6ZnZiKLaas0Eivg64_UxVfn-XFdrl1xSmbI8heoz73Q=.3a96000d-4190-4e62-9733-e02f7ccdfaa9@github.com> Message-ID: On Thu, 10 Sep 2020 18:11:24 GMT, Vicente Romero wrote: >> Note this is a case where the invoked method is not a varargs method, and there are too many actual parameters. But it >> is true the varags handling could be improved, which I tried to do in a recent patch (32845dd). > > I like the patch. I think it is great. My only comment would be about test: TestGetTypeMirrorReference.java which does > a golden file like comparison but I understand that there are not many options. I would suggest though to place this > test along with file: TestGetTypeMirrorReferenceData.java in a separate folder and add some doc to the test so that it > would be easier to modify it in the future Thanks! I've tried to improve the text (moved to a separate directory, added comment) in 988f85b. ------------- PR: https://git.openjdk.java.net/jdk/pull/50 From vromero at openjdk.java.net Fri Sep 11 20:48:48 2020 From: vromero at openjdk.java.net (Vicente Romero) Date: Fri, 11 Sep 2020 20:48:48 GMT Subject: RFR: 8240658: Code completion not working for lambdas in method invocations that require type inference [v3] In-Reply-To: References: Message-ID: On Fri, 11 Sep 2020 13:51:21 GMT, Jan Lahoda wrote: >> When a method invocation requires type inference, and the user is in the process of typing of a (block) lambda that is >> a parameter to the method invocation, javac may not, in some cases, perform the type inference, which then may lead to >> non working code completion in JShell (and possibly other tools). For example (in JShell): >> Arrays.stream(new Integer[]{1}).forEach(v -> { System.err.println(v. >> >> and press - this leads to no proposals currently, as the type of "v" is not inferred. >> >> The idea of the proposed patch is to improve the recovery in cases significant for cases where the text is being typed, >> and allow type inference in these cases. The type of "v" is then inferred, and the code completion works. > > Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision: > > Moving the TestGetTypeMirrorReference test into a separate folder. Marked as reviewed by vromero (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/50 From vromero at openjdk.java.net Fri Sep 11 20:48:51 2020 From: vromero at openjdk.java.net (Vicente Romero) Date: Fri, 11 Sep 2020 20:48:51 GMT Subject: RFR: 8240658: Code completion not working for lambdas in method invocations that require type inference [v2] In-Reply-To: References: <9kOjJIx2_i4SvMp4J7QRWvc3G3d-n4Lvw5-Di0RGqrY=.f68458ed-6194-457a-948a-74bf31f56c4e@github.com> Message-ID: On Thu, 10 Sep 2020 18:11:41 GMT, Vicente Romero 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 three additional commits since >> the last revision: >> - Improving behavior for vararg method invocations. >> - Merge branch 'master' into JDK-8240658 >> - 8240658: Code completion not working for lambdas in method invocations that require type inference > > Marked as reviewed by vromero (Reviewer). I like the changes done at (988f85b) thanks. I think the patch is ready to go ------------- PR: https://git.openjdk.java.net/jdk/pull/50 From jlahoda at openjdk.java.net Mon Sep 14 08:16:08 2020 From: jlahoda at openjdk.java.net (Jan Lahoda) Date: Mon, 14 Sep 2020 08:16:08 GMT Subject: Integrated: 8240658: Code completion not working for lambdas in method invocations that require type inference In-Reply-To: References: Message-ID: On Mon, 7 Sep 2020 11:28:45 GMT, Jan Lahoda wrote: > When a method invocation requires type inference, and the user is in the process of typing of a (block) lambda that is > a parameter to the method invocation, javac may not, in some cases, perform the type inference, which then may lead to > non working code completion in JShell (and possibly other tools). For example (in JShell): > Arrays.stream(new Integer[]{1}).forEach(v -> { System.err.println(v. > > and press - this leads to no proposals currently, as the type of "v" is not inferred. > > The idea of the proposed patch is to improve the recovery in cases significant for cases where the text is being typed, > and allow type inference in these cases. The type of "v" is then inferred, and the code completion works. This pull request has now been integrated. Changeset: 68da63dc Author: Jan Lahoda URL: https://git.openjdk.java.net/jdk/commit/68da63dc Stats: 708 lines in 9 files changed: 9 ins; 672 del; 27 mod 8240658: Code completion not working for lambdas in method invocations that require type inference Reviewed-by: vromero ------------- PR: https://git.openjdk.java.net/jdk/pull/50 From mcimadamore at openjdk.java.net Mon Sep 14 20:33:45 2020 From: mcimadamore at openjdk.java.net (Maurizio Cimadamore) Date: Mon, 14 Sep 2020 20:33:45 GMT Subject: RFR: 8240658: Code completion not working for lambdas in method invocations that require type inference [v3] In-Reply-To: References: Message-ID: <9c2GPF7-DotiEhk5_XRU2ukPxPCph-bRMmAlIim3PuE=.c5b81718-b651-4a0d-99a5-533a67e28c57@github.com> On Fri, 11 Sep 2020 13:51:21 GMT, Jan Lahoda wrote: >> When a method invocation requires type inference, and the user is in the process of typing of a (block) lambda that is >> a parameter to the method invocation, javac may not, in some cases, perform the type inference, which then may lead to >> non working code completion in JShell (and possibly other tools). For example (in JShell): >> Arrays.stream(new Integer[]{1}).forEach(v -> { System.err.println(v. >> >> and press - this leads to no proposals currently, as the type of "v" is not inferred. >> >> The idea of the proposed patch is to improve the recovery in cases significant for cases where the text is being typed, >> and allow type inference in these cases. The type of "v" is then inferred, and the code completion works. > > Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision: > > Moving the TestGetTypeMirrorReference test into a separate folder. Late to the party; I like the fact that the recovery logic now seats neatly in its own class. In fact, I think we should probably push this even further, and explore the possibility of decoupling regular attribution from recovery attribution completely - e.g. have recovery attribution run in its separate compiler pass. Probably a bit tricky to pull off in full, but I think it will significantly simplify the maintenance of the attr code going forward. ------------- PR: https://git.openjdk.java.net/jdk/pull/50 From jlahoda at openjdk.java.net Tue Sep 15 10:01:26 2020 From: jlahoda at openjdk.java.net (Jan Lahoda) Date: Tue, 15 Sep 2020 10:01:26 GMT Subject: RFR: 8232856: jshell crashes when pressing up arrow after /! Message-ID: <2WTMuKHjtn-iYJl4hb4Dj04XhxWU8L1pMxzfhrq9TU8=.85ebae0d-6417-4b8d-8b5f-300d3bcb1b58@github.com> When re-running snippets, we remove the last entry (which is e.g. '/!'), and then put the expanded code back. But, while adding the code back, it is detected the entry-to-be-added duplicates the previous entry and is not added. But an internal "index" value is not updated, and still has the value it had before the removal, leading to inconsistency in the history internal data, and eventually, to a crash. Calling resetIndex() should fix the internal data. ------------- Commit messages: - 8232856: jshell crashes when pressing up arrow after /! Changes: https://git.openjdk.java.net/jdk/pull/173/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=173&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8232856 Stats: 14 lines in 2 files changed: 13 ins; 0 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/173.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/173/head:pull/173 PR: https://git.openjdk.java.net/jdk/pull/173 From jlahoda at openjdk.java.net Tue Sep 15 10:53:16 2020 From: jlahoda at openjdk.java.net (Jan Lahoda) Date: Tue, 15 Sep 2020 10:53:16 GMT Subject: RFR: 8240658: Code completion not working for lambdas in method invocations that require type inference [v3] In-Reply-To: <9c2GPF7-DotiEhk5_XRU2ukPxPCph-bRMmAlIim3PuE=.c5b81718-b651-4a0d-99a5-533a67e28c57@github.com> References: <9c2GPF7-DotiEhk5_XRU2ukPxPCph-bRMmAlIim3PuE=.c5b81718-b651-4a0d-99a5-533a67e28c57@github.com> Message-ID: On Mon, 14 Sep 2020 20:30:56 GMT, Maurizio Cimadamore wrote: >> Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision: >> >> Moving the TestGetTypeMirrorReference test into a separate folder. > > Late to the party; I like the fact that the recovery logic now seats neatly in its own class. In fact, I think we > should probably push this even further, and explore the possibility of decoupling regular attribution from recovery > attribution completely - e.g. have recovery attribution run in its separate compiler pass. Probably a bit tricky to > pull off in full, but I think it will significantly simplify the maintenance of the attr code going forward. @mcimadamore - sure, I'll look into that! ------------- PR: https://git.openjdk.java.net/jdk/pull/50 From vromero at openjdk.java.net Mon Sep 21 21:39:18 2020 From: vromero at openjdk.java.net (Vicente Romero) Date: Mon, 21 Sep 2020 21:39:18 GMT Subject: RFR: 8246774: Record Classes (final) implementation Message-ID: <48S0UHUnWOQmJO6ErAIDgerNxM4Ibm9anIDZAdcKBp0=.32180f4d-1096-4645-8b23-54aa9f0300fb@github.com> Co-authored-by: Vicente Romero Co-authored-by: Harold Seigel Co-authored-by: Jonathan Gibbons Co-authored-by: Brian Goetz Co-authored-by: Maurizio Cimadamore Co-authored-by: Joe Darcy Co-authored-by: Chris Hegarty Co-authored-by: Jan Lahoda ------------- Commit messages: - 8246774: Record Classes (final) implementation Changes: https://git.openjdk.java.net/jdk/pull/290/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=290&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8246774 Stats: 495 lines in 95 files changed: 23 ins; 362 del; 110 mod Patch: https://git.openjdk.java.net/jdk/pull/290.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/290/head:pull/290 PR: https://git.openjdk.java.net/jdk/pull/290 From vromero at openjdk.java.net Mon Sep 21 21:39:18 2020 From: vromero at openjdk.java.net (Vicente Romero) Date: Mon, 21 Sep 2020 21:39:18 GMT Subject: RFR: 8246774: Record Classes (final) implementation In-Reply-To: <48S0UHUnWOQmJO6ErAIDgerNxM4Ibm9anIDZAdcKBp0=.32180f4d-1096-4645-8b23-54aa9f0300fb@github.com> References: <48S0UHUnWOQmJO6ErAIDgerNxM4Ibm9anIDZAdcKBp0=.32180f4d-1096-4645-8b23-54aa9f0300fb@github.com> Message-ID: On Mon, 21 Sep 2020 21:30:51 GMT, Vicente Romero wrote: > Co-authored-by: Vicente Romero > Co-authored-by: Harold Seigel > Co-authored-by: Jonathan Gibbons > Co-authored-by: Brian Goetz > Co-authored-by: Maurizio Cimadamore > Co-authored-by: Joe Darcy > Co-authored-by: Chris Hegarty > Co-authored-by: Jan Lahoda Please review the fix for [1]. The intention of this patch is to make records final removing the need to use --enable-preview in order to be able to include a record declaration in a source or for the VM to execute code compiled from record classes, Thanks [1] https://bugs.openjdk.java.net/browse/JDK-8246774 ------------- PR: https://git.openjdk.java.net/jdk/pull/290 From darcy at openjdk.java.net Mon Sep 21 21:56:01 2020 From: darcy at openjdk.java.net (Joe Darcy) Date: Mon, 21 Sep 2020 21:56:01 GMT Subject: RFR: 8246774: Record Classes (final) implementation In-Reply-To: References: <48S0UHUnWOQmJO6ErAIDgerNxM4Ibm9anIDZAdcKBp0=.32180f4d-1096-4645-8b23-54aa9f0300fb@github.com> Message-ID: On Mon, 21 Sep 2020 21:36:39 GMT, Vicente Romero wrote: >> Co-authored-by: Vicente Romero >> Co-authored-by: Harold Seigel >> Co-authored-by: Jonathan Gibbons >> Co-authored-by: Brian Goetz >> Co-authored-by: Maurizio Cimadamore >> Co-authored-by: Joe Darcy >> Co-authored-by: Chris Hegarty >> Co-authored-by: Jan Lahoda > > Please review the fix for [1]. The intention of this patch is to make records final removing the need to > use --enable-preview in order to be able to include a record declaration in a source or for the VM to execute code > compiled from record classes, Thanks > > [1] https://bugs.openjdk.java.net/browse/JDK-8246774 Hi Vicente, Please file a separate subtask for the javax.lang.model changes. This helps with the JSR 269 MR paperwork. Thanks, -Joe ------------- PR: https://git.openjdk.java.net/jdk/pull/290 From vromero at openjdk.java.net Mon Sep 21 23:24:57 2020 From: vromero at openjdk.java.net (Vicente Romero) Date: Mon, 21 Sep 2020 23:24:57 GMT Subject: RFR: 8246774: Record Classes (final) implementation [v2] In-Reply-To: <48S0UHUnWOQmJO6ErAIDgerNxM4Ibm9anIDZAdcKBp0=.32180f4d-1096-4645-8b23-54aa9f0300fb@github.com> References: <48S0UHUnWOQmJO6ErAIDgerNxM4Ibm9anIDZAdcKBp0=.32180f4d-1096-4645-8b23-54aa9f0300fb@github.com> Message-ID: <_6qw2pA7HDrTWsZPIpQOAjSE14-9iULneDMN_o9ixNw=.0a72cfba-bb8c-454e-bfc7-44553f11bbe1@github.com> > Co-authored-by: Vicente Romero > Co-authored-by: Harold Seigel > Co-authored-by: Jonathan Gibbons > Co-authored-by: Brian Goetz > Co-authored-by: Maurizio Cimadamore > Co-authored-by: Joe Darcy > Co-authored-by: Chris Hegarty > Co-authored-by: Jan Lahoda Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: removing the javax.lang.model related code to be moved to a separate bug ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/290/files - new: https://git.openjdk.java.net/jdk/pull/290/files/9eedb3ab..543e5054 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=290&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=290&range=00-01 Stats: 134 lines in 12 files changed: 130 ins; 0 del; 4 mod Patch: https://git.openjdk.java.net/jdk/pull/290.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/290/head:pull/290 PR: https://git.openjdk.java.net/jdk/pull/290 From vromero at openjdk.java.net Mon Sep 21 23:24:58 2020 From: vromero at openjdk.java.net (Vicente Romero) Date: Mon, 21 Sep 2020 23:24:58 GMT Subject: RFR: 8246774: Record Classes (final) implementation In-Reply-To: References: <48S0UHUnWOQmJO6ErAIDgerNxM4Ibm9anIDZAdcKBp0=.32180f4d-1096-4645-8b23-54aa9f0300fb@github.com> Message-ID: On Mon, 21 Sep 2020 21:53:05 GMT, Joe Darcy wrote: >> Please review the fix for [1]. The intention of this patch is to make records final removing the need to >> use --enable-preview in order to be able to include a record declaration in a source or for the VM to execute code >> compiled from record classes, Thanks >> >> [1] https://bugs.openjdk.java.net/browse/JDK-8246774 > > Hi Vicente, > Please file a separate subtask for the javax.lang.model changes. This helps with the JSR 269 MR paperwork. > Thanks, > -Joe note: I have removed from the original patch the code related to javax.lang.model, I will publish them in a separate PR ------------- PR: https://git.openjdk.java.net/jdk/pull/290 From chegar at openjdk.java.net Tue Sep 22 09:51:59 2020 From: chegar at openjdk.java.net (Chris Hegarty) Date: Tue, 22 Sep 2020 09:51:59 GMT Subject: RFR: 8246774: Record Classes (final) implementation In-Reply-To: References: <48S0UHUnWOQmJO6ErAIDgerNxM4Ibm9anIDZAdcKBp0=.32180f4d-1096-4645-8b23-54aa9f0300fb@github.com> Message-ID: On Mon, 21 Sep 2020 23:21:18 GMT, Vicente Romero wrote: >> Hi Vicente, >> Please file a separate subtask for the javax.lang.model changes. This helps with the JSR 269 MR paperwork. >> Thanks, >> -Joe > > note: I have removed from the original patch the code related to javax.lang.model, I will publish them in a separate PR @vicente-romero-oracle I noticed that we can also remove the preview args from the record serialization tests and ObjectMethodsTest. I opened a PR against the branch in your fork. You should be able to just merge in the changes. See https://github.com/vicente-romero-oracle/jdk/pull/1 ------------- PR: https://git.openjdk.java.net/jdk/pull/290 From vicente.romero at oracle.com Wed Sep 23 03:30:13 2020 From: vicente.romero at oracle.com (Vicente Romero) Date: Tue, 22 Sep 2020 23:30:13 -0400 Subject: RFR: 8246774: Record Classes (final) implementation In-Reply-To: References: <48S0UHUnWOQmJO6ErAIDgerNxM4Ibm9anIDZAdcKBp0=.32180f4d-1096-4645-8b23-54aa9f0300fb@github.com> Message-ID: good catch Chris, thanks for the patch, Vicente On 9/22/20 5:51 AM, Chris Hegarty wrote: > On Mon, 21 Sep 2020 23:21:18 GMT, Vicente Romero wrote: > >>> Hi Vicente, >>> Please file a separate subtask for the javax.lang.model changes. This helps with the JSR 269 MR paperwork. >>> Thanks, >>> -Joe >> note: I have removed from the original patch the code related to javax.lang.model, I will publish them in a separate PR > @vicente-romero-oracle I noticed that we can also remove the preview args from the record serialization tests and > ObjectMethodsTest. I opened a PR against the branch in your fork. You should be able to just merge in the changes. See > https://github.com/vicente-romero-oracle/jdk/pull/1 > > ------------- > > PR: https://git.openjdk.java.net/jdk/pull/290 From vromero at openjdk.java.net Wed Sep 23 03:34:29 2020 From: vromero at openjdk.java.net (Vicente Romero) Date: Wed, 23 Sep 2020 03:34:29 GMT Subject: RFR: 8246774: Record Classes (final) implementation [v3] In-Reply-To: <48S0UHUnWOQmJO6ErAIDgerNxM4Ibm9anIDZAdcKBp0=.32180f4d-1096-4645-8b23-54aa9f0300fb@github.com> References: <48S0UHUnWOQmJO6ErAIDgerNxM4Ibm9anIDZAdcKBp0=.32180f4d-1096-4645-8b23-54aa9f0300fb@github.com> Message-ID: > Co-authored-by: Vicente Romero > Co-authored-by: Harold Seigel > Co-authored-by: Jonathan Gibbons > Co-authored-by: Brian Goetz > Co-authored-by: Maurizio Cimadamore > Co-authored-by: Joe Darcy > Co-authored-by: Chris Hegarty > Co-authored-by: Jan Lahoda Vicente Romero has updated the pull request incrementally with three additional commits since the last revision: - Merge pull request #1 from ChrisHegarty/record-serial-tests Remove preview args from JDK tests - Remove preview args from ObjectMethodsTest - Remove preview args from record serialization tests ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/290/files - new: https://git.openjdk.java.net/jdk/pull/290/files/543e5054..26b80775 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=290&range=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=290&range=01-02 Stats: 95 lines in 21 files changed: 0 ins; 35 del; 60 mod Patch: https://git.openjdk.java.net/jdk/pull/290.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/290/head:pull/290 PR: https://git.openjdk.java.net/jdk/pull/290 From mchung at openjdk.java.net Thu Sep 24 00:26:11 2020 From: mchung at openjdk.java.net (Mandy Chung) Date: Thu, 24 Sep 2020 00:26:11 GMT Subject: RFR: 8246774: Record Classes (final) implementation In-Reply-To: References: <48S0UHUnWOQmJO6ErAIDgerNxM4Ibm9anIDZAdcKBp0=.32180f4d-1096-4645-8b23-54aa9f0300fb@github.com> Message-ID: On Tue, 22 Sep 2020 09:49:12 GMT, Chris Hegarty wrote: >> note: I have removed from the original patch the code related to javax.lang.model, I will publish them in a separate PR > > @vicente-romero-oracle I noticed that we can also remove the preview args from the record serialization tests and > ObjectMethodsTest. I opened a PR against the branch in your fork. You should be able to just merge in the changes. See > https://github.com/vicente-romero-oracle/jdk/pull/1 What is the policy of `@since` release value when a preview API becomes final. I would expect `@since` should be updated from 14 to 16 because 16 is the Java SE release these APIs are added?? ------------- PR: https://git.openjdk.java.net/jdk/pull/290 From alex.buckley at oracle.com Thu Sep 24 00:40:11 2020 From: alex.buckley at oracle.com (Alex Buckley) Date: Wed, 23 Sep 2020 17:40:11 -0700 Subject: RFR: 8246774: Record Classes (final) implementation In-Reply-To: References: <48S0UHUnWOQmJO6ErAIDgerNxM4Ibm9anIDZAdcKBp0=.32180f4d-1096-4645-8b23-54aa9f0300fb@github.com> Message-ID: <495cc1e9-41ad-3f9a-c91d-93b0d0d6c3f9@oracle.com> On 9/23/2020 5:26 PM, Mandy Chung wrote: > What is the policy of `@since` release value when a preview API > becomes final. I would expect `@since` should be updated from 14 > to 16 because 16 is the Java SE release these APIs are added?? Yes. Per http://openjdk.java.net/jeps/12#Specifications-of-Preview-Features : In particular, all elements of a preview API must have the following tags: ... An @since tag that indicates the release when [the API element] was first added. *If the API element is eventually made final and permanent in Java SE $N, then the @since tag must be changed to indicate the $N release (the element's history prior to $N is not of long-term interest).* Alex From mchung at openjdk.java.net Thu Sep 24 00:55:22 2020 From: mchung at openjdk.java.net (Mandy Chung) Date: Thu, 24 Sep 2020 00:55:22 GMT Subject: RFR: 8246774: Record Classes (final) implementation In-Reply-To: References: <48S0UHUnWOQmJO6ErAIDgerNxM4Ibm9anIDZAdcKBp0=.32180f4d-1096-4645-8b23-54aa9f0300fb@github.com> Message-ID: On Thu, 24 Sep 2020 00:23:13 GMT, Mandy Chung wrote: >> @vicente-romero-oracle I noticed that we can also remove the preview args from the record serialization tests and >> ObjectMethodsTest. I opened a PR against the branch in your fork. You should be able to just merge in the changes. See >> https://github.com/vicente-romero-oracle/jdk/pull/1 > > What is the policy of `@since` release value when a preview API becomes final. I would expect `@since` should be > updated from 14 to 16 because 16 is the Java SE release these APIs are added?? Thanks Alex. @vicente-romero-oracle `@since` needs to be changed. ------------- PR: https://git.openjdk.java.net/jdk/pull/290 From coleenp at openjdk.java.net Thu Sep 24 12:27:14 2020 From: coleenp at openjdk.java.net (Coleen Phillimore) Date: Thu, 24 Sep 2020 12:27:14 GMT Subject: RFR: 8246774: Record Classes (final) implementation [v3] In-Reply-To: References: <48S0UHUnWOQmJO6ErAIDgerNxM4Ibm9anIDZAdcKBp0=.32180f4d-1096-4645-8b23-54aa9f0300fb@github.com> Message-ID: On Wed, 23 Sep 2020 03:34:29 GMT, Vicente Romero wrote: >> Co-authored-by: Vicente Romero >> Co-authored-by: Harold Seigel >> Co-authored-by: Jonathan Gibbons >> Co-authored-by: Brian Goetz >> Co-authored-by: Maurizio Cimadamore >> Co-authored-by: Joe Darcy >> Co-authored-by: Chris Hegarty >> Co-authored-by: Jan Lahoda > > Vicente Romero has updated the pull request incrementally with three additional commits since the last revision: > > - Merge pull request #1 from ChrisHegarty/record-serial-tests > > Remove preview args from JDK tests > - Remove preview args from ObjectMethodsTest > - Remove preview args from record serialization tests The classfile parser changes look good to me. ------------- Marked as reviewed by coleenp (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/290 From vromero at openjdk.java.net Thu Sep 24 15:49:52 2020 From: vromero at openjdk.java.net (Vicente Romero) Date: Thu, 24 Sep 2020 15:49:52 GMT Subject: RFR: 8246774: Record Classes (final) implementation [v4] In-Reply-To: <48S0UHUnWOQmJO6ErAIDgerNxM4Ibm9anIDZAdcKBp0=.32180f4d-1096-4645-8b23-54aa9f0300fb@github.com> References: <48S0UHUnWOQmJO6ErAIDgerNxM4Ibm9anIDZAdcKBp0=.32180f4d-1096-4645-8b23-54aa9f0300fb@github.com> Message-ID: > Co-authored-by: Vicente Romero > Co-authored-by: Harold Seigel > Co-authored-by: Jonathan Gibbons > Co-authored-by: Brian Goetz > Co-authored-by: Maurizio Cimadamore > Co-authored-by: Joe Darcy > Co-authored-by: Chris Hegarty > Co-authored-by: Jan Lahoda Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: modifiying @since from 14 to 16 ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/290/files - new: https://git.openjdk.java.net/jdk/pull/290/files/26b80775..514b0a80 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=290&range=03 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=290&range=02-03 Stats: 8 lines in 7 files changed: 0 ins; 0 del; 8 mod Patch: https://git.openjdk.java.net/jdk/pull/290.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/290/head:pull/290 PR: https://git.openjdk.java.net/jdk/pull/290 From vromero at openjdk.java.net Thu Sep 24 15:49:52 2020 From: vromero at openjdk.java.net (Vicente Romero) Date: Thu, 24 Sep 2020 15:49:52 GMT Subject: RFR: 8246774: Record Classes (final) implementation [v3] In-Reply-To: References: <48S0UHUnWOQmJO6ErAIDgerNxM4Ibm9anIDZAdcKBp0=.32180f4d-1096-4645-8b23-54aa9f0300fb@github.com> Message-ID: <0H-sMIm0mwGW2f2OxwAwMGBtxDf2BUf7ds3tGEgYXrc=.849aab2b-4cf3-49f7-8e49-ad1df75cb0bb@github.com> On Thu, 24 Sep 2020 12:23:13 GMT, Coleen Phillimore wrote: >> Vicente Romero has updated the pull request incrementally with three additional commits since the last revision: >> >> - Merge pull request #1 from ChrisHegarty/record-serial-tests >> >> Remove preview args from JDK tests >> - Remove preview args from ObjectMethodsTest >> - Remove preview args from record serialization tests > > The classfile parser changes look good to me. I have modified the `@since`: 14 -> 16 ------------- PR: https://git.openjdk.java.net/jdk/pull/290 From vromero at openjdk.java.net Thu Sep 24 15:54:57 2020 From: vromero at openjdk.java.net (Vicente Romero) Date: Thu, 24 Sep 2020 15:54:57 GMT Subject: RFR: 8246774: Record Classes (final) implementation [v5] In-Reply-To: <48S0UHUnWOQmJO6ErAIDgerNxM4Ibm9anIDZAdcKBp0=.32180f4d-1096-4645-8b23-54aa9f0300fb@github.com> References: <48S0UHUnWOQmJO6ErAIDgerNxM4Ibm9anIDZAdcKBp0=.32180f4d-1096-4645-8b23-54aa9f0300fb@github.com> Message-ID: <1mJrr-6f-CRtIrhQqH7VlpzuNZdR0dzdDiLnacBx32I=.a0823203-fc37-4fc7-a104-6031c580fd21@github.com> > Co-authored-by: Vicente Romero > Co-authored-by: Harold Seigel > Co-authored-by: Jonathan Gibbons > Co-authored-by: Brian Goetz > Co-authored-by: Maurizio Cimadamore > Co-authored-by: Joe Darcy > Co-authored-by: Chris Hegarty > Co-authored-by: Jan Lahoda Vicente Romero has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains seven commits: - Merge branch 'master' into JDK-8246774 - modifiying @since from 14 to 16 - Merge pull request #1 from ChrisHegarty/record-serial-tests Remove preview args from JDK tests - Remove preview args from ObjectMethodsTest - Remove preview args from record serialization tests - removing the javax.lang.model related code to be moved to a separate bug - 8246774: Record Classes (final) implementation Co-authored-by: Vicente Romero Co-authored-by: Harold Seigel Co-authored-by: Jonathan Gibbons Co-authored-by: Brian Goetz Co-authored-by: Maurizio Cimadamore Co-authored-by: Joe Darcy Co-authored-by: Chris Hegarty Co-authored-by: Jan Lahoda ------------- Changes: https://git.openjdk.java.net/jdk/pull/290/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=290&range=04 Stats: 464 lines in 104 files changed: 23 ins; 267 del; 174 mod Patch: https://git.openjdk.java.net/jdk/pull/290.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/290/head:pull/290 PR: https://git.openjdk.java.net/jdk/pull/290 From vromero at openjdk.java.net Fri Sep 25 00:41:47 2020 From: vromero at openjdk.java.net (Vicente Romero) Date: Fri, 25 Sep 2020 00:41:47 GMT Subject: RFR: 8246774: Record Classes (final) implementation [v6] In-Reply-To: <48S0UHUnWOQmJO6ErAIDgerNxM4Ibm9anIDZAdcKBp0=.32180f4d-1096-4645-8b23-54aa9f0300fb@github.com> References: <48S0UHUnWOQmJO6ErAIDgerNxM4Ibm9anIDZAdcKBp0=.32180f4d-1096-4645-8b23-54aa9f0300fb@github.com> Message-ID: > Co-authored-by: Vicente Romero > Co-authored-by: Harold Seigel > Co-authored-by: Jonathan Gibbons > Co-authored-by: Brian Goetz > Co-authored-by: Maurizio Cimadamore > Co-authored-by: Joe Darcy > Co-authored-by: Chris Hegarty > Co-authored-by: Jan Lahoda Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: adding missing changes to some tests ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/290/files - new: https://git.openjdk.java.net/jdk/pull/290/files/89f7cc54..915b67e0 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=290&range=05 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=290&range=04-05 Stats: 71 lines in 5 files changed: 9 ins; 11 del; 51 mod Patch: https://git.openjdk.java.net/jdk/pull/290.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/290/head:pull/290 PR: https://git.openjdk.java.net/jdk/pull/290 From vromero at openjdk.java.net Fri Sep 25 02:40:47 2020 From: vromero at openjdk.java.net (Vicente Romero) Date: Fri, 25 Sep 2020 02:40:47 GMT Subject: RFR: 8246774: Record Classes (final) implementation [v3] In-Reply-To: <0H-sMIm0mwGW2f2OxwAwMGBtxDf2BUf7ds3tGEgYXrc=.849aab2b-4cf3-49f7-8e49-ad1df75cb0bb@github.com> References: <48S0UHUnWOQmJO6ErAIDgerNxM4Ibm9anIDZAdcKBp0=.32180f4d-1096-4645-8b23-54aa9f0300fb@github.com> <0H-sMIm0mwGW2f2OxwAwMGBtxDf2BUf7ds3tGEgYXrc=.849aab2b-4cf3-49f7-8e49-ad1df75cb0bb@github.com> Message-ID: On Thu, 24 Sep 2020 15:45:22 GMT, Vicente Romero wrote: >> The classfile parser changes look good to me. > > I have modified the `@since`: 14 -> 16 [CSR: Record Classes](https://bugs.openjdk.java.net/browse/JDK-8253605) ------------- PR: https://git.openjdk.java.net/jdk/pull/290 From plevart at openjdk.java.net Fri Sep 25 15:50:48 2020 From: plevart at openjdk.java.net (Peter Levart) Date: Fri, 25 Sep 2020 15:50:48 GMT Subject: RFR: 8246774: Record Classes (final) implementation [v3] In-Reply-To: References: <48S0UHUnWOQmJO6ErAIDgerNxM4Ibm9anIDZAdcKBp0=.32180f4d-1096-4645-8b23-54aa9f0300fb@github.com> <0H-sMIm0mwGW2f2OxwAwMGBtxDf2BUf7ds3tGEgYXrc=.849aab2b-4cf3-49f7-8e49-ad1df75cb0bb@github.com> Message-ID: On Fri, 25 Sep 2020 02:38:01 GMT, Vicente Romero wrote: >> I have modified the `@since`: 14 -> 16 > > [CSR: Record Classes](https://bugs.openjdk.java.net/browse/JDK-8253605) Hi @vicente-romero-oracle , note that besides tests, there is also a JMH benchmark that measures the performance of records deserialization which forced us to modify the build procedure for all benchmarks to include --enable-preview option in JDK 15 and backports (see https://bugs.openjdk.java.net/browse/JDK-8248135). If you undo this change in JDK 16 then also the problem described in https://bugs.openjdk.java.net/browse/JDK-8250669 and https://bugs.openjdk.java.net/browse/JDK-8248429 will disapear. After that, perhaps undoing the same for JDK 15 and backports together with removing the benchmark is also possible to resolve the issues in older releases as most developement will probably happen in JDK 16 then and so the need for performance testing will mostly be needed in there. We still have to figure out how to enable having benchmarks for preview features as in the future the sure will be a need for that. ------------- PR: https://git.openjdk.java.net/jdk/pull/290 From jlahoda at openjdk.java.net Tue Sep 29 14:07:57 2020 From: jlahoda at openjdk.java.net (Jan Lahoda) Date: Tue, 29 Sep 2020 14:07:57 GMT Subject: RFR: 8246774: Record Classes (final) implementation [v6] In-Reply-To: References: <48S0UHUnWOQmJO6ErAIDgerNxM4Ibm9anIDZAdcKBp0=.32180f4d-1096-4645-8b23-54aa9f0300fb@github.com> Message-ID: On Fri, 25 Sep 2020 00:41:47 GMT, Vicente Romero wrote: >> Co-authored-by: Vicente Romero >> Co-authored-by: Harold Seigel >> Co-authored-by: Jonathan Gibbons >> Co-authored-by: Brian Goetz >> Co-authored-by: Maurizio Cimadamore >> Co-authored-by: Joe Darcy >> Co-authored-by: Chris Hegarty >> Co-authored-by: Jan Lahoda > > Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: > > adding missing changes to some tests Marked as reviewed by jlahoda (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/290 From jlahoda at openjdk.java.net Tue Sep 29 14:07:57 2020 From: jlahoda at openjdk.java.net (Jan Lahoda) Date: Tue, 29 Sep 2020 14:07:57 GMT Subject: RFR: 8246774: Record Classes (final) implementation [v3] In-Reply-To: References: <48S0UHUnWOQmJO6ErAIDgerNxM4Ibm9anIDZAdcKBp0=.32180f4d-1096-4645-8b23-54aa9f0300fb@github.com> <0H-sMIm0mwGW2f2OxwAwMGBtxDf2BUf7ds3tGEgYXrc=.849aab2b-4cf3-49f7-8e49-ad1df75cb0bb@github.com> Message-ID: On Fri, 25 Sep 2020 15:47:30 GMT, Peter Levart wrote: >> [CSR: Record Classes](https://bugs.openjdk.java.net/browse/JDK-8253605) > > Hi @vicente-romero-oracle , note that besides tests, there is also a JMH benchmark that measures the performance of > records deserialization (org.openjdk.bench.java.io.RecordDeserialization) which forced us to modify the build procedure > for all benchmarks to include --enable-preview option in JDK 15 and backports (see > https://bugs.openjdk.java.net/browse/JDK-8248135). If you undo this change in JDK 16 then also the problem described in > https://bugs.openjdk.java.net/browse/JDK-8250669 and https://bugs.openjdk.java.net/browse/JDK-8248429 will disapear. > After that, perhaps undoing the same for JDK 15 and backports together with removing the benchmark is also possible to > resolve the issues in older releases as most developement will probably happen in JDK 16 then and so the need for > performance testing will mostly be needed in there. We still have to figure out how to enable having benchmarks for > preview features as in the future there most probably will be a need for that. Langtools code looks good to me. We probably can also remove the RECORDS entry from PreviewFeature.Feature. ------------- PR: https://git.openjdk.java.net/jdk/pull/290 From vromero at openjdk.java.net Tue Sep 29 16:49:36 2020 From: vromero at openjdk.java.net (Vicente Romero) Date: Tue, 29 Sep 2020 16:49:36 GMT Subject: RFR: 8246774: Record Classes (final) implementation [v7] In-Reply-To: <48S0UHUnWOQmJO6ErAIDgerNxM4Ibm9anIDZAdcKBp0=.32180f4d-1096-4645-8b23-54aa9f0300fb@github.com> References: <48S0UHUnWOQmJO6ErAIDgerNxM4Ibm9anIDZAdcKBp0=.32180f4d-1096-4645-8b23-54aa9f0300fb@github.com> Message-ID: > Co-authored-by: Vicente Romero > Co-authored-by: Harold Seigel > Co-authored-by: Jonathan Gibbons > Co-authored-by: Brian Goetz > Co-authored-by: Maurizio Cimadamore > Co-authored-by: Joe Darcy > Co-authored-by: Chris Hegarty > Co-authored-by: Jan Lahoda Vicente Romero has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 15 commits: - Merge branch 'JDK-8246774' of https://github.com/vicente-romero-oracle/jdk into JDK-8246774 - adding missing changes to some tests - Merge branch 'master' into JDK-8246774 - modifiying @since from 14 to 16 - Merge pull request #1 from ChrisHegarty/record-serial-tests Remove preview args from JDK tests - Remove preview args from ObjectMethodsTest - Remove preview args from record serialization tests - removing the javax.lang.model related code to be moved to a separate bug - 8246774: Record Classes (final) implementation Co-authored-by: Vicente Romero Co-authored-by: Harold Seigel Co-authored-by: Jonathan Gibbons Co-authored-by: Brian Goetz Co-authored-by: Maurizio Cimadamore Co-authored-by: Joe Darcy Co-authored-by: Chris Hegarty Co-authored-by: Jan Lahoda - adding missing changes to some tests - ... and 5 more: https://git.openjdk.java.net/jdk/compare/d5be8294...482fedec ------------- Changes: https://git.openjdk.java.net/jdk/pull/290/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=290&range=06 Stats: 535 lines in 109 files changed: 32 ins; 278 del; 225 mod Patch: https://git.openjdk.java.net/jdk/pull/290.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/290/head:pull/290 PR: https://git.openjdk.java.net/jdk/pull/290 From vromero at openjdk.java.net Tue Sep 29 18:34:07 2020 From: vromero at openjdk.java.net (Vicente Romero) Date: Tue, 29 Sep 2020 18:34:07 GMT Subject: RFR: 8246774: Record Classes (final) implementation [v8] In-Reply-To: <48S0UHUnWOQmJO6ErAIDgerNxM4Ibm9anIDZAdcKBp0=.32180f4d-1096-4645-8b23-54aa9f0300fb@github.com> References: <48S0UHUnWOQmJO6ErAIDgerNxM4Ibm9anIDZAdcKBp0=.32180f4d-1096-4645-8b23-54aa9f0300fb@github.com> Message-ID: > Co-authored-by: Vicente Romero > Co-authored-by: Harold Seigel > Co-authored-by: Jonathan Gibbons > Co-authored-by: Brian Goetz > Co-authored-by: Maurizio Cimadamore > Co-authored-by: Joe Darcy > Co-authored-by: Chris Hegarty > Co-authored-by: Jan Lahoda Vicente Romero has refreshed the contents of this pull request, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/290/files - new: https://git.openjdk.java.net/jdk/pull/290/files/482fedec..76e3d278 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=290&range=07 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=290&range=06-07 Stats: 0 lines in 0 files changed: 0 ins; 0 del; 0 mod Patch: https://git.openjdk.java.net/jdk/pull/290.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/290/head:pull/290 PR: https://git.openjdk.java.net/jdk/pull/290 From sspitsyn at openjdk.java.net Wed Sep 30 00:08:44 2020 From: sspitsyn at openjdk.java.net (Serguei Spitsyn) Date: Wed, 30 Sep 2020 00:08:44 GMT Subject: RFR: 8246774: implementing Record Classes as a standard feature in Java [v6] In-Reply-To: References: <48S0UHUnWOQmJO6ErAIDgerNxM4Ibm9anIDZAdcKBp0=.32180f4d-1096-4645-8b23-54aa9f0300fb@github.com> Message-ID: On Tue, 29 Sep 2020 14:05:27 GMT, Jan Lahoda wrote: >> Vicente Romero has updated the pull request incrementally with one additional commit since the last revision: >> >> adding missing changes to some tests > > Marked as reviewed by jlahoda (Reviewer). The instrument tests update looks good to me. ------------- PR: https://git.openjdk.java.net/jdk/pull/290 From vromero at openjdk.java.net Wed Sep 30 00:21:20 2020 From: vromero at openjdk.java.net (Vicente Romero) Date: Wed, 30 Sep 2020 00:21:20 GMT Subject: RFR: 8246774: implementing Record Classes as a standard feature in Java [v6] In-Reply-To: References: <48S0UHUnWOQmJO6ErAIDgerNxM4Ibm9anIDZAdcKBp0=.32180f4d-1096-4645-8b23-54aa9f0300fb@github.com> Message-ID: On Wed, 30 Sep 2020 00:06:19 GMT, Serguei Spitsyn wrote: >> Marked as reviewed by jlahoda (Reviewer). > > The instrument tests update looks good to me. @sspitsyn thanks for the review. Please add yourself as a reviewer ------------- PR: https://git.openjdk.java.net/jdk/pull/290 From vromero at openjdk.java.net Wed Sep 30 00:24:29 2020 From: vromero at openjdk.java.net (Vicente Romero) Date: Wed, 30 Sep 2020 00:24:29 GMT Subject: RFR: 8246774: implementing Record Classes as a standard feature in Java [v6] In-Reply-To: References: <48S0UHUnWOQmJO6ErAIDgerNxM4Ibm9anIDZAdcKBp0=.32180f4d-1096-4645-8b23-54aa9f0300fb@github.com> Message-ID: <9lpq7-8Hjtvui3jtyOxfKKRCGa1yObk5po4zn92Waog=.93761bb3-a0cc-4cd6-95a5-28d95c11012d@github.com> On Wed, 30 Sep 2020 00:18:17 GMT, Vicente Romero wrote: >> The instrument tests update looks good to me. > > @sspitsyn thanks for the review. Please add yourself as a reviewer @plevart interesting, but I think that I prefer to update those benchmarks in a follow-up patch in order to keep this patch as simple as possible. I will file a follow-up issue in JIRA and link it to JDK-8246774 ------------- PR: https://git.openjdk.java.net/jdk/pull/290 From sspitsyn at openjdk.java.net Wed Sep 30 00:30:49 2020 From: sspitsyn at openjdk.java.net (Serguei Spitsyn) Date: Wed, 30 Sep 2020 00:30:49 GMT Subject: RFR: 8246774: implementing Record Classes as a standard feature in Java [v8] In-Reply-To: References: <48S0UHUnWOQmJO6ErAIDgerNxM4Ibm9anIDZAdcKBp0=.32180f4d-1096-4645-8b23-54aa9f0300fb@github.com> Message-ID: On Tue, 29 Sep 2020 18:34:07 GMT, Vicente Romero wrote: >> Co-authored-by: Vicente Romero >> Co-authored-by: Harold Seigel >> Co-authored-by: Jonathan Gibbons >> Co-authored-by: Brian Goetz >> Co-authored-by: Maurizio Cimadamore >> Co-authored-by: Joe Darcy >> Co-authored-by: Chris Hegarty >> Co-authored-by: Jan Lahoda > > Vicente Romero has refreshed the contents of this pull request, and previous commits have been removed. The incremental > views will show differences compared to the previous content of the PR. Marked as reviewed by sspitsyn (Reviewer). ------------- PR: https://git.openjdk.java.net/jdk/pull/290 From chegar at openjdk.java.net Wed Sep 30 08:56:38 2020 From: chegar at openjdk.java.net (Chris Hegarty) Date: Wed, 30 Sep 2020 08:56:38 GMT Subject: RFR: 8246774: implementing Record Classes as a standard feature in Java [v3] In-Reply-To: References: <48S0UHUnWOQmJO6ErAIDgerNxM4Ibm9anIDZAdcKBp0=.32180f4d-1096-4645-8b23-54aa9f0300fb@github.com> Message-ID: On Wed, 23 Sep 2020 08:54:57 GMT, Chris Hegarty wrote: >> Vicente Romero has updated the pull request incrementally with three additional commits since the last revision: >> >> - Merge pull request #1 from ChrisHegarty/record-serial-tests >> >> Remove preview args from JDK tests >> - Remove preview args from ObjectMethodsTest >> - Remove preview args from record serialization tests > > test/langtools/tools/javac/records/LocalStaticDeclarations.java line 33: > >> 31: * jdk.compiler/com.sun.tools.javac.util >> 32: * @build combo.ComboTestHelper >> 33: * @compile LocalStaticDeclarations.java > > This, and other, explicit at compile tags could be elided, no? The test source file will be implicitly compiled by the > at run tag. I believe that the explicit at compile tag was added original so that the enable preview and source version > options could be passed to javac - neither of which are needed any more. Does this test need an @run tag rather than an @compile tag ? ( the @run with implicitly compile the source file, before running it ) ------------- PR: https://git.openjdk.java.net/jdk/pull/290 From chegar at openjdk.java.net Wed Sep 30 08:56:37 2020 From: chegar at openjdk.java.net (Chris Hegarty) Date: Wed, 30 Sep 2020 08:56:37 GMT Subject: RFR: 8246774: implementing Record Classes as a standard feature in Java [v3] In-Reply-To: References: <48S0UHUnWOQmJO6ErAIDgerNxM4Ibm9anIDZAdcKBp0=.32180f4d-1096-4645-8b23-54aa9f0300fb@github.com> Message-ID: On Wed, 23 Sep 2020 03:34:29 GMT, Vicente Romero wrote: >> Co-authored-by: Vicente Romero >> Co-authored-by: Harold Seigel >> Co-authored-by: Jonathan Gibbons >> Co-authored-by: Brian Goetz >> Co-authored-by: Maurizio Cimadamore >> Co-authored-by: Joe Darcy >> Co-authored-by: Chris Hegarty >> Co-authored-by: Jan Lahoda > > Vicente Romero has updated the pull request incrementally with three additional commits since the last revision: > > - Merge pull request #1 from ChrisHegarty/record-serial-tests > > Remove preview args from JDK tests > - Remove preview args from ObjectMethodsTest > - Remove preview args from record serialization tests Marked as reviewed by chegar (Reviewer). test/langtools/tools/javac/records/LocalStaticDeclarations.java line 33: > 31: * jdk.compiler/com.sun.tools.javac.util > 32: * @build combo.ComboTestHelper > 33: * @compile LocalStaticDeclarations.java This, and other, explicit at compile tags could be elided, no? The test source file will be implicitly compiled by the at run tag. I believe that the explicit at compile tag was added original so that the enable preview and source version options could be passed to javac - neither of which are needed any more. ------------- PR: https://git.openjdk.java.net/jdk/pull/290 From vromero at openjdk.java.net Wed Sep 30 14:50:40 2020 From: vromero at openjdk.java.net (Vicente Romero) Date: Wed, 30 Sep 2020 14:50:40 GMT Subject: RFR: 8246774: implementing Record Classes as a standard feature in Java [v3] In-Reply-To: References: <48S0UHUnWOQmJO6ErAIDgerNxM4Ibm9anIDZAdcKBp0=.32180f4d-1096-4645-8b23-54aa9f0300fb@github.com> Message-ID: <3HQG1K8tFl8GYpUnm_gbEH8MqTKMQ17fONGeb0m1RnE=.c74d767c-e371-471a-b963-944460e468f7@github.com> On Wed, 30 Sep 2020 08:54:14 GMT, Chris Hegarty wrote: >> test/langtools/tools/javac/records/LocalStaticDeclarations.java line 33: >> >>> 31: * jdk.compiler/com.sun.tools.javac.util >>> 32: * @build combo.ComboTestHelper >>> 33: * @compile LocalStaticDeclarations.java >> >> This, and other, explicit at compile tags could be elided, no? The test source file will be implicitly compiled by the >> at run tag. I believe that the explicit at compile tag was added original so that the enable preview and source version >> options could be passed to javac - neither of which are needed any more. > > Does this test need an @run tag rather than an @compile tag ? ( the @run with implicitly compile the source file, > before running it ) yep u are right it could be removed, I will check all the instances of this, thanks ------------- PR: https://git.openjdk.java.net/jdk/pull/290