RFR: 8320396: Class-File API ClassModel::verify should include checks from hotspot/share/classfile/classFileParser.cpp [v5]
Adam Sotona
asotona at openjdk.org
Tue May 14 11:17:03 UTC 2024
On Mon, 13 May 2024 17:31:25 GMT, Chen Liang <liach at openjdk.org> wrote:
>> Adam Sotona has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - fixed error thrown by VerifierImpl
>> - applied suggested changes
>
> src/java.base/share/classes/jdk/internal/classfile/impl/verifier/ParserVerifier.java line 233:
>
>> 231: ClassDesc type = ((FieldModel)ae).fieldTypeSymbol();
>> 232: ConstantValueEntry cve = cva.constant();
>> 233: if (!switch (TypeKind.from(type)) {
>
> Weird-looking switch
It may be (and actually was) composed into a single boolean expression, however effectivity and readability was worse. Boolean switch expression across Enum seems to me effective and clear to read.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16809#discussion_r1599842678
More information about the compiler-dev
mailing list