Skip to content

SPR-7925 Introduce Assert.noNullElements for collections #1565

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

rweisleder
Copy link
Contributor

As proposed in SPR-7925.

The issue also proposes a noNullKeys(Map) and noNullValues(Map). If this makes sense I would also implement it with this or a separate PR.

Prior to this commit, org.springframework.util.Assert provided
noNullElements-methods for arrays only.

This commit unifies the available methods for arrays and collections
by adding noNullElements-methods for collections.

A method without message parameter was not added since the other
methods without message parameter are deprecated.

Issue: SPR-7925
@rweisleder
Copy link
Contributor Author

PMD complains about missing asserts in the new tests. I just copied existing tests. Is there a better way to check that no exception was raised or is it okay for these tests to leave them without assert?

@sbrannen
Copy link
Member

Superseded by work performed in conjunction with #23151.

See 4000b24.

@sbrannen sbrannen added in: core Issues in core modules (aop, beans, core, context, expression) status: superseded An issue that has been superseded by another type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Jun 11, 2020
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: superseded An issue that has been superseded by another type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants