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

SourceMojo : Use isEmpty() to check whether collection is empty or not #1746

Closed
2 tasks
rohanKanojia opened this issue Feb 4, 2024 · 4 comments
Closed
2 tasks

Comments

@rohanKanojia
Copy link
Member

Description

In Java8 we have List.isEmpty() method to check whether list size is greater than zero.
This line

if (sourceMode == BuildImageSelectMode.first && imageConfigs.size() > 0) {

should be changed to

if (sourceMode == BuildImageSelectMode.first && !imageConfigs.isEmpty()) {

Acceptance Criteria

  • explicit size check is replaced with isEmpty() method
  • Project compiles cleanly when mvn clean install is run after making changes
@mdxabu
Copy link
Contributor

mdxabu commented Feb 4, 2024

Ok, I'll work on this task. But one problem, the maven dependencies and plugins are not found in Intellij Idea

@rohanKanojia
Copy link
Member Author

@mdxabu : You would need to fix your IDE setup if you want to contribute more.

You would need to do mvn clean install -DskipTestsand then click on refresh icon Reload All Maven Projects in Maven sidebar on top right.

@mdxabu
Copy link
Contributor

mdxabu commented Feb 4, 2024

@rohanKanojia , give me some good first issues.

@rohanKanojia
Copy link
Member Author

Closed via #1747

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

No branches or pull requests

2 participants