Skip to content

fix: #2058 prevent possible NPE in JobController start/stop endpoints - #2084

Merged
lbroudoux merged 2 commits into
microcks:masterfrom
dipak0000812:fix/2058-jobcontroller-npe
May 11, 2026
Merged

lbroudoux merged 2 commits into
microcks:masterfrom
dipak0000812:fix/2058-jobcontroller-npe

Conversation

@dipak0000812

Copy link
Copy Markdown
Contributor

Fix Sonar reliability issues (S2259 - possible NPE) in JobController.

Changes:

  • Added null checks before accessing ImportJob in startJob() and stopJob()

Impact:

  • Prevents potential NullPointerException when the job is not found
  • No functional behavior change
  • Aligns with existing null-check pattern used in activateJob()

@SebastienDegodez

Copy link
Copy Markdown
Member

I think it would be interesting to be able to test the scenario with a in memory repository of the jobs.

@lbroudoux lbroudoux left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lbroudoux lbroudoux added kind/task java Pull requests that update Java code labels May 11, 2026
@lbroudoux lbroudoux added this to the 1.15.0 milestone May 11, 2026

@lbroudoux lbroudoux left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lbroudoux
lbroudoux merged commit 198a456 into microcks:master May 11, 2026
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

java Pull requests that update Java code kind/task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants