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:
@@ -60,10 +60,11 @@ public abstract class BeanRegistrationCodeFragments {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Package-private constructor exclusively for
|
* Package-private constructor exclusively for
|
||||||
* {@link DefaultBeanRegistrationCodeFragments}.
|
* {@link DefaultBeanRegistrationCodeFragments}. All methods are overridden
|
||||||
|
* so {@code this.codeFragments} is never actually used.
|
||||||
*/
|
*/
|
||||||
BeanRegistrationCodeFragments() {
|
BeanRegistrationCodeFragments() {
|
||||||
this.codeFragments = null;
|
this.codeFragments = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user