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

ApplyService : Iteration can be replaced with bulk Collection.addAll() call #2971

Closed
2 tasks done
rohanKanojia opened this issue Apr 24, 2024 · 1 comment · Fixed by #2986
Closed
2 tasks done

ApplyService : Iteration can be replaced with bulk Collection.addAll() call #2971

rohanKanojia opened this issue Apr 24, 2024 · 1 comment · Fixed by #2986
Assignees
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Milestone

Comments

@rohanKanojia
Copy link
Member

rohanKanojia commented Apr 24, 2024

Component

JKube Kit

Task description

Description

We have this code in ApplyService where we're iterating over a List and manually adding each element one by one:

for (TagReference tag : fromTags) {
toTags.add(tag);
}

We can use java.util.List.addAll method here to make this a one-liner instead.

Expected Behavior

for loop is replaced with addAll

Acceptance Criteria

  • for loop is replaced with list.addAll call
  • project compiles cleanly after running mvn clean install
@rohanKanojia rohanKanojia added good first issue Good for newcomers help wanted Extra attention is needed labels Apr 24, 2024
@rohit-satya
Copy link
Contributor

@rohanKanojia Please assign this issue to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants