RFR: 8304283: Modernize the switch statements in jdk.internal.foreign [v2]
Per Minborg
pminborg at openjdk.org
Thu Mar 16 11:25:21 UTC 2023
On Wed, 15 Mar 2023 18:34:50 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> Per Minborg has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Reintroduce missing comment
>
> src/java.base/share/classes/jdk/internal/foreign/abi/riscv64/linux/TypeClass.java line 112:
>
>> 110: return flatten(sequenceLayout.elementLayout()).mul(elementCount);
>> 111: }
>> 112: case null, default -> throw new IllegalStateException("Cannot get here: " + layout);
>
> Since the default throws, and the switch w/o a `case null` also throws, do we need the `case null` here?
No. Null is not needed. I will remove it.
-------------
PR: https://git.openjdk.org/jdk/pull/13047
More information about the core-libs-dev
mailing list