Closed
Description
In the course of #34929, it turned out that the common resolution code path does not perform a proper null bean check in case of a pre-existing singleton, due to a mismatch between the singleton retrieval optimization (which immediately turns a NullBean
into null
) and the instance resolution step (which still checks for NullBean
). In #34929, we were bound to restore backwards compatibility for the shortcut code path even if this actually revealed a bug.
As a side note, this has not been reported by NullAway due to the unspecified nullability of Map.get
access that we use internally. In any case, this needs to be addressed for 7.0 where it fits with the general JSpecify nullability revision.