RFR: 8333169: javac NullPointerException record.type

Vicente Romero vromero at openjdk.org
Fri May 31 11:09:00 UTC 2024


On Fri, 31 May 2024 10:32:20 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:

> While attributing cases, `Attr` computes `completesNormally`, by invoking `Flow`. It will do `preFlow` before running the `Flow`, to make fill in missing types/symbols in the AST, as `Flow` generally requires them. But, the visitor filling the types is missing code to fill in the missing type for record patterns, and consequently `Flow` may crash on record pattern while computing `completesNormally`.
> 
> The proposal herein is to adjust the visitor to fill in the missing attributes for record patterns, as is done for other AST nodes.
> 
> I've also filled a follow-up to reconsider computing `completesNormally` in `Attr`, to get more performance. This will require moving some of the checks that are currently done in `Attr` to `Flow`, but it would probably pay off:
> https://bugs.openjdk.org/browse/JDK-8333333

looks good

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

Marked as reviewed by vromero (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/19498#pullrequestreview-2090570155


More information about the compiler-dev mailing list