RFR: 8310905: [lw5] addressing review comments on null restricted types [v5]

Vicente Romero vromero at openjdk.org
Thu Jul 13 22:03:17 UTC 2023


On Thu, 13 Jul 2023 16:18:55 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:

>> Vicente Romero has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   addressing another round of review comments
>
> src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java line 1288:
> 
>> 1286:             @Override
>> 1287:             public Boolean visitType(Type t, Type s) {
>> 1288:                 Warner warner = !warnStack.isEmpty() ? warnStack.head : noWarnings;
> 
> Good cleanup. I assume that now nullability comparator really has no state, so you could in principle create two instances (with the two comparator functions), and just use those instances, right?

not really, in one case we are using this comparator: `(t1, t2) -> !hasSameNullability(t1, t2)`, see the `!` operator, so we would need three different instances

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

PR Review Comment: https://git.openjdk.org/valhalla/pull/880#discussion_r1263090489



More information about the valhalla-dev mailing list