Skip to content

Refactor ImageStreamService loop to remove use of continue and go to statements #2531

@rohanKanojia

Description

@rohanKanojia

Component

JKube Kit

Task description

Description

This loop in ImageStreamService needs some minor refactoring. It uses multiple continue and even go-to statement. Perhaps it's a remnant of legacy code that was ported from Fabric8 Maven Plugin.

https://github.com/eclipse/jkube/blob/275dc11e9bd0a268aac94f112ac2c443960d957b/jkube-kit/config/service/src/main/java/org/eclipse/jkube/kit/config/service/openshift/ImageStreamService.java#L178-L209

Refactor this loop not to use continue statements.

Expected Behavior

Loop should not contain any continue statements

Acceptance Criteria

  • Get rid of continue statements on line 190, 194, 198
  • Get rid of go to statement in nested loop on line 208
  • Move nested loop to a separate private method
  • ImageStreamServiceTest should pass even after refactoring code

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions