Skip to content

Fix getLastJobExecution to handle no job execution found and add test for this case#5390

Open
gideruette wants to merge 1 commit into
spring-projects:mainfrom
gideruette:gideruette/issue-5389/get-last-job-execution-no-execution-found
Open

Fix getLastJobExecution to handle no job execution found and add test for this case#5390
gideruette wants to merge 1 commit into
spring-projects:mainfrom
gideruette:gideruette/issue-5389/get-last-job-execution-no-execution-found

Conversation

@gideruette
Copy link
Copy Markdown

@gideruette gideruette commented Apr 30, 2026

Closes #5389

As

getJdbcTemplate().queryForObject

Expects exactly one result, when no execution is found, exception was thrown. This fix catchs exception and returns null
Null element is handle by the caller.

@gideruette gideruette force-pushed the gideruette/issue-5389/get-last-job-execution-no-execution-found branch 5 times, most recently from 14b3589 to 0e1b0f2 Compare April 30, 2026 13:57
@gideruette gideruette changed the title Refactor getLastJobExecution to handle no job execution found and add test for this case Fix getLastJobExecution to handle no job execution found and add test for this case Apr 30, 2026
@gideruette gideruette force-pushed the gideruette/issue-5389/get-last-job-execution-no-execution-found branch from 0e1b0f2 to 1c144d4 Compare May 7, 2026 08:30
@gideruette gideruette requested a review from quaff May 7, 2026 13:56
@gideruette gideruette force-pushed the gideruette/issue-5389/get-last-job-execution-no-execution-found branch from 1c144d4 to cd63fd0 Compare May 8, 2026 13:03
… test for this case

Closes spring-projectsgh-5389

Signed-off-by: Gildéric Deruette <gilderic.deruette@kleegroup.com>
@gideruette gideruette force-pushed the gideruette/issue-5389/get-last-job-execution-no-execution-found branch from cd63fd0 to 11809e2 Compare May 8, 2026 13:04
@gideruette gideruette requested a review from quaff May 8, 2026 13:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

EmptyResultDataAccessException on getLastJobExecution when no job execution is found

2 participants