RFR: JDK-8232684: Make switch expressions final
jan.lahoda at oracle.com
Tue Nov 5 09:50:21 UTC 2019
I've missed updates to some hotspot and jdk tests in the first patch.
The problem are unqualified invocations of Thread.yield(), which are no
longer allowed (from the spec: JLS 3.9 Keywords: "All invocations of a
method called yield must be qualified so as to be distinguished from a
yield statement."). Therefore, these invocations need to be changed to
qualified invocations (i.e. Thread.yield()). Updates to the hotspot and
jdk tests are here:
Full updated webrev, with changes to both javac and the tests, is here:
How does that look?
On 21. 10. 19 16:17, Maurizio Cimadamore wrote:
> Looks generally good - went through the test updates one by one and
> they look ok, except this:
> Which you explained to me offline (we need to change this code every
> time the compiler stops using the @Preview annotation - ugh). Nothing
> specific to this webrev, so I approve.
> On 21/10/2019 14:49, Jan Lahoda wrote:
>> As part of preparation for proposing JEP 361: Switch Expressions
>> (Standard) to target, I would like to ask for a review of the patch to
>> make switch expression a non-preview feature in javac:
>> The patch basically removes the feature from the list of preview
>> features, updates test to this new state (removes --enable-preview
>> from associated tests, and adjusts their expected output), and removes
>> the @PreviewFeature annotation and associated text from the javadoc of
>> the Trees API.
>> I also would like to ask for a review for the CSR associated with that:
>> Reviews/comments on either of these would be very welcome!
>> JBS: https://bugs.openjdk.java.net/browse/JDK-8232684
More information about the hotspot-dev