There was a race condition between the thread that's waiting for
Tomcat to become inactive or the graceful shutdown to be aborted
and the thread that aborts the shutdown and stops Tomcat when the
grace period has elapsed. This race can lead to Tomcat appearing
to have become inactive before the abort of the shutdown is
noticed. When this happens, the result of the shutdown is reported
as IDLE when it should have been REQUESTS_ACTIVE. The consequences
of this are mostly benign although it does affect the log messages
that are emitted. It is also causing some of our graceful shutdown
tests to be flaky.
This commit eliminates the race condition by considering the
state of the aborted flag before logging and returning the result
of the shutdown.
Closes gh-39942
This commit adapts the error controller tests that need the request
to fail with a bind issue, and simulate the behavior of
ModelAttributeMethodProcessor.
As of Spring Framework 6.0.x, this processor no longer throws a
BindingException, but rather a MethodArgumentNotValidException and
the handing of BindException itself is deprecated.
This makes sure that those tests can smoothly be executed against
Spring Framework 6.2.x as throwing a BindingException now results
into an unresolved exception, and an internal server error rather than
the expected bad request.
See gh-39767
This commit moves the resolution check for ConnectionDetailsFactory
to a dedicated method to make it more clear that it is meant to verify
that the implementation is resolved and can be loaded from the
classpath.
The previous algorithm relied on a behavior of ResolvableType that only
resolves the first level generics. Further improvements in Spring
Framework 6.2 make this check invalid as some implementations use a
Container that can hold a nested generic.
See gh-39737
Update the regular expression used to parse Docker images references to
prevent catastrophic backtracking when images names are long and the
tag contains an illegal character.
See gh-39617