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

ContainerHandler : Return empty collection instead of null #2812

Closed
2 tasks done
rohanKanojia opened this issue Mar 13, 2024 · 0 comments · Fixed by #2822
Closed
2 tasks done

ContainerHandler : Return empty collection instead of null #2812

rohanKanojia opened this issue Mar 13, 2024 · 0 comments · Fixed by #2822
Labels
good first issue Good for newcomers help wanted Extra attention is needed
Milestone

Comments

@rohanKanojia
Copy link
Member

rohanKanojia commented Mar 13, 2024

Component

JKube Kit

Task description

Description

ContainerHandler seems to be returning a null value in a method with a list return type:

https://github.com/eclipse/jkube/blob/c4ee9d4e9432297c50d9385a8c06d1fea0f75e3a/jkube-kit/enricher/api/src/main/java/org/eclipse/jkube/kit/enricher/handler/ContainerHandler.java#L184

Sonar flags this as a code smell. We should replace this with Collections.emptyList().

Expectations would also need to be updated in ContainerHandlerTest

Expected Behavior

ContainerHandler.getContainerPorts is updated to return a non null value

Acceptance Criteria

  • ContainerHandler.getContainerPorts is updated to return a non null value
  • Project compiles successfully after running mvn clean install
@rohanKanojia rohanKanojia added good first issue Good for newcomers help wanted Extra attention is needed labels Mar 13, 2024
@manusa manusa added this to the 1.17.0 milestone Mar 19, 2024
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.

2 participants