Fix null assignment to non-nullable field
Update `BeanRegistrationCodeFragments` package-private constructor to set `codeFragments` to `this` rather than `null`. The field is never actually read by `DefaultBeanRegistrationCodeFragments` since all methods are overridden. Closes gh-28578
This commit is contained in:
parent
22ef3ec783
commit
c01a2e897d
|
|
@ -60,10 +60,11 @@ public abstract class BeanRegistrationCodeFragments {
|
|||
|
||||
/**
|
||||
* Package-private constructor exclusively for
|
||||
* {@link DefaultBeanRegistrationCodeFragments}.
|
||||
* {@link DefaultBeanRegistrationCodeFragments}. All methods are overridden
|
||||
* so {@code this.codeFragments} is never actually used.
|
||||
*/
|
||||
BeanRegistrationCodeFragments() {
|
||||
this.codeFragments = null;
|
||||
this.codeFragments = this;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue