This commit lowers the level of Throwable handling in parts of
spring-websocket which now handle Exception instead and allow any Error
to propagate.
Closes gh-24075
Previously, tests in ConcurrentWebSocketSessionDecoratorTests that use
the BlockingSession would fail intermittently. This appears to have
been due to a race condition in sendBlockingMessage where the call
to getSentMessageLatch() that stores a latch in nextMessageLatch on
the main thread may happen after the call to sendMessage that counts
down the latch if it is non-null occurs on the executor's thread.
This commit updates sendBlockingMessage to call getSentMessageLatch()
(and therefore store the latch) before it sumbmits the task to the
executor. This ensures that the latch will be available when the
exeuctor's thread attempts to retrieve and decrement it.
BlockingSession's AtomicReference fields have also been made final to
eliminate the possibility of any visibility problems across threads.
Closes gh-23642
Prior to this commit, the Spring Framework build would partially use the
dependency management plugin to import and enforce BOMs.
This commit applies the dependency management plugin to all Java
projects and regroups all version management declaration in the root
`build.gradle` file (versions and exclusions).
Some versions are overridden in specific modules for
backwards-compatibility reasons or extended support.
This commit also adds the Gradle versions plugin that checks for
dependency upgrades in artifact repositories and produces a report; you
can use the following:
./gradlew dependencyUpdates
This commit prepends "[{index}] " to all custom display names
configured via @ParameterizedTest.
This provides better diagnostics between the "technical names" reported
on the CI server vs. the "display names" reported within a developer's
IDE.
See gh-23451
Use a callback to detect token authentication (via inteceptor) thus
avoiding a potential race between that detection after the message is
sent on the inbound channel (via Executor) and the processing of the
CONNECTED frame returned from the broker on the outbound channel.
Closes gh-23160
Prior to this commit, all clients of
ControllerAdviceBean.findAnnotatedBeans() sorted the returned list
manually. In addition, clients within the core Spring Framework
unnecessarily used AnnotationAwareOrderComparator instead of
OrderComparator to sort the list.
This commit presorts the ControllerAdviceBean list using OrderComparator
directly within ControllerAdviceBean.findAnnotatedBeans().
Closes gh-23188
This commit migrates to the MockitoJUnitRunner where sensible, which
will later allow for an easier migration to Mockito's extension for
JUnit Jupiter.
In addition, this commit deletes unnecessary stubbing for various mocks
and polishes test fixture setup in various test classes.