Skip to content

Conversation

@quaff
Copy link
Contributor

@quaff quaff commented Mar 28, 2025

The result of yaml.loadAll(reader) will never contains null element.

The result of `yaml.loadAll(reader)` will never contains null element.

Signed-off-by: Yanming Zhou <[email protected]>
@quaff
Copy link
Contributor Author

quaff commented Mar 28, 2025

Not sure null check required here.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Mar 28, 2025
@rstoyanchev rstoyanchev self-assigned this Jun 4, 2025
@rstoyanchev rstoyanchev added type: task A general task in: core Issues in core modules (aop, beans, core, context, expression) and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Jun 4, 2025
@rstoyanchev rstoyanchev added this to the 7.0.0-M6 milestone Jun 4, 2025
Copy link
Contributor

@rstoyanchev rstoyanchev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On closer look, not so easy to verify. loadAll calls constructor.getData() and that in turn calls constructObject which does a lookup into a Map, and even if the key is present, the value could be null. I didn't trace it further, but I think the null check is worth having as protection.

@rstoyanchev rstoyanchev removed this from the 7.0.0-M6 milestone Jun 10, 2025
@rstoyanchev rstoyanchev added the status: declined A suggestion or change that we don't feel we should currently apply label Jun 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in: core Issues in core modules (aop, beans, core, context, expression) status: declined A suggestion or change that we don't feel we should currently apply type: task A general task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants