Skip to content
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

New collection argument check methods in KiwiPreconditions #753

Closed
sleberknight opened this issue Jul 21, 2022 · 0 comments · Fixed by #754
Closed

New collection argument check methods in KiwiPreconditions #753

sleberknight opened this issue Jul 21, 2022 · 0 comments · Fixed by #754
Assignees
Labels
new feature A new feature such as a new class, method, package, group of classes, etc.
Milestone

Comments

@sleberknight
Copy link
Member

Add several new methods to KiwiPreconditions to check that Collection and Map arguments are not empty (treating null as empty):

  • <T> void checkArgumentNotEmpty(Collection<T> collection)
  • <K, V> void checkArgumentNotEmpty(Map<K, V> map)

These both throw IllegalArgumentException if the argument is null or empty.

@sleberknight sleberknight added the new feature A new feature such as a new class, method, package, group of classes, etc. label Jul 21, 2022
@sleberknight sleberknight added this to the 2.2.0 milestone Jul 21, 2022
@sleberknight sleberknight self-assigned this Jul 21, 2022
@sleberknight sleberknight added the in progress A task that is actively being worked on label Jul 21, 2022
sleberknight added a commit that referenced this issue Jul 21, 2022
* Add checkArgumentNotEmpty methods for Collection and Map with
  overloads for an error message, and an error message template with
  replacement values.

Closes #753
@sleberknight sleberknight removed the in progress A task that is actively being worked on label Jul 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature A new feature such as a new class, method, package, group of classes, etc.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant