ContextLoader incorrectly refreshes already refreshed context [SPR-9996] #14630
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
status: backported
An issue that has been backported to maintenance branches
type: bug
A general bug
Milestone
Paul Tomlin opened SPR-9996 and commented
Referring to org.springframework.web.context.ContextLoader
JavaDocs for ContextLoader#ContextLoader(WebApplicationContext) state:
However, it appears that a context provided to the constructor which has already been refreshed, is again refreshed.
ContextLoader#initWebApplicationContext(ServletContext) checks if the context is a ConfigurableWebApplicationContext but no check appears to be made for ConfigurableApplicationContext#isActive(), or Lifecycle#isRunning()
Affects: 3.1.3
Issue Links:
Referenced from: commits 701c5f1, b720804
Backported to: 3.1.4
The text was updated successfully, but these errors were encountered: