Skip to content

NullPointerException in UndertowWebServer.destroy() when using @DirtiesContext and Citrus Spring Boot Simulator #48446

@tschlat

Description

@tschlat

Description:
After upgrading from Spring Boot 3.5.7 to 3.5.8, tests using @DirtiesContext with Undertow as embedded server fail with a NullPointerException during context cleanup.

Affected versions:
Spring Boot 3.5.8 (works in 3.5.7)
Undertow 2.3.20.Final

Root Cause Analysis:
This appears to be a regression introduced by the fix for #48061 (backport of #47141). The separation of stop() and destroy() methods in UndertowWebServer causes DeploymentManagerImpl.stop() to be called when deployment is already null.

The following public project can be used to reproduce the issue:
https://github.com/tschlat/spring-boot-3-5-8-undertow-issue

Metadata

Metadata

Assignees

Labels

type: regressionA regression from a previous release

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions