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

DockerComposeServiceWrapper : Use isEmpty() to check collection is empty #1779

Closed
2 tasks
rohanKanojia opened this issue Apr 13, 2024 · 3 comments · Fixed by #1782
Closed
2 tasks

DockerComposeServiceWrapper : Use isEmpty() to check collection is empty #1779

rohanKanojia opened this issue Apr 13, 2024 · 3 comments · Fixed by #1782
Assignees

Comments

@rohanKanojia
Copy link
Member

Description

Instead of checking size greater than zero, use inbuilt isEmpty method

if (volumes.size() > 0) {
builder.bind(volumes);
added = true;
}
List<String> volumesFrom = asList("volumes_from");
if (volumesFrom.size() > 0) {

Acceptance Criteria

  • size() > 0 check is replaced by isEmpty()
  • Rename configuration field so that it doesn't collide with class level field
@rohanKanojia
Copy link
Member Author

@mdxabu : Could you please check if this is okay for you to pick?

@alpha951
Copy link
Contributor

Hey @rohanKanojia can you please assign this issue to me?

@alpha951
Copy link
Contributor

Hey @rohanKanojia, I've raised a PR #1782 addressing this issue. Let me know if any further change is required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants