RFR: 8310905: [lw5] addressing review comments on null restricted types [v6]
Maurizio Cimadamore
mcimadamore at openjdk.org
Fri Jul 14 00:44:19 UTC 2023
On Thu, 13 Jul 2023 22:35:41 GMT, Vicente Romero <vromero at openjdk.org> wrote:
>> addressing some review comments related to PR [1]
>>
>> [1] https://github.com/openjdk/valhalla/pull/872
>
> 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?
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/880#discussion_r1263165764
More information about the valhalla-dev
mailing list