RFR: 8268124: Update java.lang to use switch expressions [v3]
Mandy Chung
mchung at openjdk.java.net
Thu Jun 3 17:09:39 UTC 2021
On Thu, 3 Jun 2021 11:01:02 GMT, Patrick Concannon <pconcannon at openjdk.org> wrote:
>> Hi,
>>
>> Could someone please review my code for updating the code in the `java.lang` packages to make use of the switch expressions?
>>
>> Kind regards,
>> Patrick
>
> Patrick Concannon has updated the pull request incrementally with one additional commit since the last revision:
>
> 8268124: small refactoring; fixed misplaced comment and added missing lambda operator
Looks good with one minor comment in `DirectMethodHandleDescImpl.java`.
src/java.base/share/classes/java/lang/constant/DirectMethodHandleDescImpl.java line 138:
> 136: public String lookupDescriptor() {
> 137: return switch (kind) {
> 138: case VIRTUAL, SPECIAL,
Nit: I prefer to have each case in a separate line (in this switch and also the switch in `resolveConstantDesc`.
-------------
Marked as reviewed by mchung (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/4312
More information about the core-libs-dev
mailing list