There is a strange arrangement in BeanRegistrationCodeFragments where a package private constructor sets a non-null field to null. Making the field nullable doesn't help as it's used in all methods implemented by that class.

Comment From: snicoll

cc @philwebb