Community
Participate
Working Groups
https://bugs.openjdk.java.net/browse/JDK-8196004
I'll take a look at this one, then.
Created attachment 274535 [details] java.g and assoc parser changes - wip (In reply to Jesper Moller from comment #1) > I'll take a look at this one, then. Thanks Jesper. As of now this is not targeted - will have to wait until next week to be sure. [I had tried this initially - attaching those patches - they are dated - if it helps let it]
Created attachment 274536 [details] Scanner changes - WIP (dated)
@Manoj: I've had some problems getting to a clean test result in the BETA_JAVA_12 branch, just running RunAllJava11Tests under JDK 11.0.0. It's like the Java version switches are wrong in some cases, since the failures are about stuff like nested class names and the use of synthetic accessors. I'll investigate further.
(In reply to Jesper Moller from comment #4) > @Manoj: I've had some problems getting to a clean test result in the > BETA_JAVA_12 branch, just running RunAllJava11Tests under JDK 11.0.0. > > It's like the Java version switches are wrong in some cases, since the > failures are about stuff like nested class names and the use of synthetic > accessors. > > I'll investigate further. Jesper, I released some changes recently. Can you try now?
Looks like the grammar and scanner changes are good enough for me to continue the work into the resolution. I will take this up.
The grammar and scanner changes passed my simple tests. Had to make some changes in resolution phase to make things work. I will be adding more complex tests and making changes as required. At a quick glance, debug seems unaffected too. I have raised 541254 for code assist.
Note, this will be a preview feature.
JEP 326 may be dropped as per https://mail.openjdk.java.net/pipermail/jdk-dev/2018-December/002402.html
(In reply to Manoj Palat from comment #9) > JEP 326 may be dropped as per > https://mail.openjdk.java.net/pipermail/jdk-dev/2018-December/002402.html Most likely now. It's already listed in the plan: http://openjdk.java.net/projects/jdk/12/#Schedule
(In reply to Dani Megert from comment #10) > (In reply to Manoj Palat from comment #9) > > JEP 326 may be dropped as per > > https://mail.openjdk.java.net/pipermail/jdk-dev/2018-December/002402.html > > Most likely now. It's already listed in the plan: > http://openjdk.java.net/projects/jdk/12/#Schedule Dropped - ref https://mail.openjdk.java.net/pipermail/jdk-dev/2018-December/002469.html
This is appearing in the JEP 388 Java 13 dashboard - Hence keeping in radar.
@Jay: You may want to check out this discussion : https://mail.openjdk.java.net/pipermail/amber-spec-experts/2019-April/001119.html
A new Avatar : https://bugs.openjdk.java.net/browse/JDK-8222530
(In reply to Manoj Palat from comment #14) > A new Avatar : https://bugs.openjdk.java.net/browse/JDK-8222530 And the JEP 355 (Preview) available here: http://cr.openjdk.java.net/~abuckley/jep355/text-blocks-jls.html
New Gerrit change created: https://git.eclipse.org/r/143065
Gerrit change https://git.eclipse.org/r/143065 was merged to [BETA_JAVA13]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=0beb35f8f1d9f23acdb771167f1d97e01aa3e597
(In reply to Eclipse Genie from comment #17) > Gerrit change https://git.eclipse.org/r/143065 was merged to [BETA_JAVA13]. > Commit: > http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=0beb35f8f1d9f23acdb771167f1d97e01aa3e597 > Released the change along with support for Unicode and indentation. The error reporting on incomplete text block is not aggressive just to make sure we don't deviate from previous error reporting, for e.g. the below code: String s = """"""; Ideally we would like to report the missing newline after the opening delimiter """, but that would mean we change some of the existing tests. Perhaps we can revisit at a later point to cover these. Another IMPORTANT NOTE: After this grammar change and the previous grammar changes in the branch, I started seeing some nasty errors (mostly AIOOBE) in the parser. Investigation revealed that we reached the boundary of 128 (max a byte can store). The table in question is Parser#scope_la, which was previously a byte[] but no longer enough to store 128, which when converted to int, became -127 and hence all the index related operations started throwing exception. This change is now part of the fix. The ParserUpdater tool of JDT needs corresponding change too. Luckily, looking at the source code of Jikespg, I see that it is programmed to handle both byte and char and correctly generates char[] for the scope_la and it is our internal tool that wasn't prepared for this.
Things to do to complete this: 1. Add more tests, like using text blocks as argument, using them interchangeably with strings etc. 2. Move the new tests to the new test bundle suggested in bug 546473, so that we can compare our test results with the new String APIs in JDK 13, such as stripIndent, translateEscapes etc. 3. Run/write performance tests to make sure performance for regular String operations are unaffected by the new code in Scanner.
@Jay: looks like commit 7b27f6aee778dd071b90ede7982881541c81dc47 inadvertently removed the changes in .api_filters for 548208 - the api issue - could you please recheck the commit and change accordingly
New Gerrit change created: https://git.eclipse.org/r/144595
New Gerrit change created: https://git.eclipse.org/r/144614
Gerrit change https://git.eclipse.org/r/144614 was merged to [BETA_JAVA13]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=6f75d2c4e0637f5b29bb6515519f82fc73531476
(In reply to Eclipse Genie from comment #21) > New Gerrit change created: https://git.eclipse.org/r/144595 After discussing with Manoj, Abandoned this in favour of https://git.eclipse.org/r/144614
Turns out we had another boundary reached in Parser#term_check. I am upgrading that one as well to two bytes instead of a single byte. This was causing the failures in NullTypeAnnotationTest (probably others too). I will post a patch shortly for this.
New Gerrit change created: https://git.eclipse.org/r/144812
Gerrit change https://git.eclipse.org/r/144812 was merged to [BETA_JAVA13]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=5c08a66823b46c862957cde2f7ae7c4c633d23c4
New Gerrit change created: https://git.eclipse.org/r/144901
Gerrit change https://git.eclipse.org/r/144901 was merged to [BETA_JAVA13]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=fe413967f2fcfe63c75c7a190acbf9b388328996
New Gerrit change created: https://git.eclipse.org/r/145127
Gerrit change https://git.eclipse.org/r/145127 was merged to [BETA_JAVA13]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=2a04c1bba1f28dce7e05a6f7da819cf098c2f04d
New Gerrit change created: https://git.eclipse.org/r/145497
Gerrit change https://git.eclipse.org/r/145497 was merged to [BETA_JAVA13]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=ba38cbc42b824a26720727ec32191753fe9e726b
New Gerrit change created: https://git.eclipse.org/r/146288
Gerrit change https://git.eclipse.org/r/146288 was merged to [BETA_JAVA13]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=50a1e318609e40977fdde51f75bedd3bb7e8a17d
New Gerrit change created: https://git.eclipse.org/r/146460
Gerrit change https://git.eclipse.org/r/146460 was merged to [BETA_JAVA13]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=9bac232c01ec45a64cbc1a6b3ddd30a01b0ca301
New Gerrit change created: https://git.eclipse.org/r/146541
Gerrit change https://git.eclipse.org/r/146541 was merged to [BETA_JAVA13]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=0b920f8d9742e0166ea1ad621a04054c362f9e37
Additional material on text blocks- http://cr.openjdk.java.net/~jlaskey/Strings/TextBlocksGuide_v8.html
@Jay: with -Xlint:text-blocks on, javac provides some warnings- for eg, given the following code: @SuppressWarnings("preview") class X { public static void main(String[] args) { String t = """ trailing white space """; System.out.println(t); } } $ javac13 --enable-preview -source 13 -Xlint:text-blocks X.java X.java:4: warning: [text-blocks] trailing white space will be removed String t = """ ^ Here the trailing white space has trailing white space. I think ecj should also flag a warning in this case.
(In reply to Manoj Palat from comment #41) > @Jay: with -Xlint:text-blocks on, javac provides some warnings- for eg, > given the following code: > @SuppressWarnings("preview") > class X { > public static void main(String[] args) { > String t = """ > trailing white space > """; > System.out.println(t); > } > } > > $ javac13 --enable-preview -source 13 -Xlint:text-blocks X.java > X.java:4: warning: [text-blocks] trailing white space will be removed > String t = """ > ^ > > Here the > trailing white space > > has trailing white space. > I think ecj should also flag a warning in this case. That'll be nice to have and the spec doesn't say anything. We can keep that on another bug. I am closing this one.