RFR: 8310905: [lw5] addressing review comments on null restricted types [v6]
Vicente Romero
vromero at openjdk.org
Fri Jul 14 15:47:16 UTC 2023
On Fri, 14 Jul 2023 00:41:08 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> Vicente Romero has updated the pull request incrementally with two additional commits since the last revision:
>>
>> - addressing additional review comments
>> - dont generate warnings for literals or constructor invocations
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/code/Type.java line 399:
>
>> 397: public <M extends TypeMetadata, Z> Z getMetadata(Class<M> metadataClass, Function<M, Z> metadataFunc, Z defaultValue) {
>> 398: for (TypeMetadata m : metadata) {
>> 399: if (m.getClass().isAssignableFrom(metadataClass)) {
>
> isn't TypeMetadata `sealed` ? I suppose the code you wrote is correct (and better than `==`), but I don't think we should have inherited metadata? E.g. an `equals` should be good?
yes I guess it should be good, I will replace it in the next iteration
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/880#discussion_r1263880583
More information about the valhalla-dev
mailing list