<i18n dev> RFR: 8268124: Update java.lang to use switch expressions [v3]

Patrick Concannon pconcannon at openjdk.java.net
Thu Jun 3 11:01:04 UTC 2021


On Wed, 2 Jun 2021 16:43:25 GMT, Naoto Sato <naoto at openjdk.org> wrote:

>> 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
>
> src/java.base/share/classes/java/lang/CharacterData.java line 80:
> 
>> 78:                 case 2 -> CharacterData02.instance;
>> 79:                 case 3 -> CharacterData03.instance;
>> 80:                 case 14 -> CharacterData0E.instance; // Private Use
> 
> Plane 14 is not `private use`

Hi Naoto. Well spotted. I've corrected that now. See a8706b0

> src/java.base/share/classes/java/lang/invoke/DirectMethodHandle.java line 90:
> 
>> 88:             // findVirtual etc.
>> 89:             return switch (refKind) {
>> 90:                 case REF_invokeSpecial: {
> 
> Is ':' preferred here (and other cases too) instead of "->"?

My mistake. I've replaced the colon now with the lambda operator. See a8706b0

-------------

PR: https://git.openjdk.java.net/jdk/pull/4312


More information about the i18n-dev mailing list