Commit Graph

1021 Commits

Author SHA1 Message Date
Sam Brannen c3ce4f0f90 Polish contribution
See gh-27823
2022-01-04 15:12:29 +01:00
Marten Deinum e1200f34e7 Use try-with-resources for AutoClosables where feasible
Where unfeasible, this commit adds inline comments to explain why
try-with-resources must not be used in certain scenarios. The purpose
of the comments is to avoid accidental conversion to try-with-resources
at a later date.

Closes gh-27823
2022-01-04 15:12:29 +01:00
liuzhifei 7021eb5bb1 Apply "instanceof pattern matching" in additional locations
Closes gh-27696
2022-01-03 16:52:38 +01:00
Juergen Hoeller ba468a731f Remove JamonPerformanceMonitorInterceptor support
Includes upgrade to Tomcat 10.0.14, Undertow 2.2.14, Apache HttpClient 5.1.2, Hibernate ORM 5.6.2, Mockito 4.1.

Closes gh-27786
2021-12-14 09:46:08 +01:00
Rossen Stoyanchev a15393836c Merge branch '5.3.x' into main 2021-12-09 15:35:21 +00:00
Rossen Stoyanchev e9083d7d20 Apply LogFormatUtils in more places 2021-12-09 14:53:52 +00:00
Juergen Hoeller 7f43128a0e Merge branch '5.3.x'
# Conflicts:
#	build.gradle
#	spring-web/src/main/java/org/springframework/web/server/MediaTypeNotSupportedStatusException.java
#	spring-web/src/main/java/org/springframework/web/util/ContentCachingRequestWrapper.java
#	spring-webmvc/src/main/java/org/springframework/web/servlet/handler/HandlerMappingIntrospector.java
2021-12-03 22:42:05 +01:00
Juergen Hoeller 70974e006e Upgrade to Tomcat 9.0.55, Undertow 2.2.13, RxJava 3.1.3, SmallRye Mutiny 1.2, Joda-Time 2.10.13, JRuby 9.2.20.1, HtmlUnit 2.55, Checkstyle 9.2 2021-12-03 22:32:00 +01:00
Juergen Hoeller 4750a9430c Early removal of 5.x-deprecated code
Closes gh-27686
2021-11-18 09:18:06 +01:00
SungMin 32af39d6e6
Use 'toString(Charset)' instead of 'toString(String)' for encodings (#27646)
Co-authored-by: 홍성민(SungMin Hong)/Platform Engineering팀/11ST <devmonster@11stcorp.com>
2021-11-10 15:11:33 +01:00
Sam Brannen b51813e408 Apply "instanceof pattern matching" in spring-websocket
This commit also applies additional clean-up tasks such as the following.

- final fields
- diamond operator (<>) for anonymous inner classes

This has only been applied to `src/main/java`.
2021-10-17 19:04:32 +02:00
Sam Brannen 08bce08018 Use text blocks with JUnit Jupiter 5.8.1
See gh-27450
2021-09-28 14:20:31 +02:00
Sam Brannen 93efb20a53 Fix broken links in Javadoc
This commit removes several links that were broken due to the removal
of various APIs in 6.0.

See gh-27480
2021-09-28 13:34:33 +02:00
Sam Brannen 16bf39ea1b Merge branch '5.3.x' 2021-09-28 10:35:18 +02:00
Sam Brannen 2567b20949 Upgrade to spring-javaformat 0.0.28 and downgrade to Checkstyle 8.41
In order to be able to use text blocks and other new Java language
features, we are upgrading to a recent version of Checkstyle.

The latest version of spring-javaformat-checkstyle (0.0.28) is built
against Checkstyle 8.32 which does not include support for language
features such as text blocks. Support for text blocks was added in
Checkstyle 8.36.

In addition, there is a binary compatibility issue between
spring-javaformat-checkstyle 0.0.28 and Checkstyle 8.42. Thus we cannot
use Checkstyle 8.42 or higher.

In this commit, we therefore upgrade to spring-javaformat-checkstyle
0.0.28 and downgrade to Checkstyle 8.41.

This change is being applied to `5.3.x` as well as `main` in order to
benefit from the enhanced checking provided in more recent versions of
Checkstyle.

Closes gh-27481
2021-09-28 10:29:31 +02:00
Rossen Stoyanchev 48875dc44f Fix Jetty WebSocket test failures
See gh-27424
2021-09-17 14:53:09 +01:00
Juergen Hoeller d84ca2ba90 Jakarta EE 9 migration
Upgrades many dependency declarations; removes old EJB 2.x support and outdated Servlet-based integrations (Commons FileUpload, FreeMarker JSP support, Tiles).

Closes gh-22093
Closes gh-25354
Closes gh-26185
Closes gh-27423
See gh-27424
2021-09-17 09:14:07 +02:00
Brian Clozel cecc0849a8 Upgrade to Gradle 7.2
This commit upgrades Gradle to 7.2.
Gradle configuration names are updated accordingly.
This also upgrades Gradle build plugins.

See gh-26870
2021-09-13 09:37:35 +02:00
Sam Brannen 9f7a94058a Update copyright date
See gh-27298
2021-08-19 16:23:38 +02:00
LEE Juchan caf6760ddd
Fix grammatical errors in Javadoc
Closes gh-27298
2021-08-19 16:21:15 +02:00
Stephane Nicoll af6fd6c303 Polish "Fix duplicate "the" in Javadoc and XSD"
See gh-27291
2021-08-19 08:54:38 +02:00
Sanghyuk Jung ac72277258 Fix duplicate "the" in Javadoc and XSD
See gh-27291
2021-08-19 08:44:03 +02:00
Sam Brannen 42edef0bcc Avoid StringIndexOutOfBoundsException in WebSocketMessageBrokerStats
Prior to this commit, if the TaskExecutor configured in
WebSocketMessageBrokerStats for the inboundChannelExecutor or
outboundChannelExecutor was not a ThreadPoolTaskExecutor, a
StringIndexOutOfBoundsException was thrown when attempting to parse the
results of invoking toString() on the executor.

The reason is that ThreadPoolTaskExecutor delegates to a
ThreadPoolExecutor whose toString() implementation generates text
containing "pool size = ...", and WebSocketMessageBrokerStats'
getExecutorStatsInfo() method relied on the presence of "pool" in the
text returned from toString().

This commit fixes this bug by ensuring that the text returned from
toString() contains "pool" before parsing the text. If "pool" is not
present in the text, getExecutorStatsInfo() now returns "unknown"
instead of throwing a StringIndexOutOfBoundsException.

Closes gh-27209
2021-07-25 19:05:02 +02:00
Sam Brannen e94811f1b9 Polish WebSocketMessageBrokerConfigurationSupportTests 2021-07-24 21:45:31 +03:00
Stephane Nicoll c6e644e5c3 Polish "Downcast to InetSocketAddress for Jetty 10"
This commit uses the target type where getRemoteAddress and
getLocalAddress are defined.

See gh-27120
2021-07-13 09:38:37 +02:00
Rossen Stoyanchev 6d01d49b76 Downcast to InetSocketAddress for Jetty 10
Closes gh-27120
2021-07-12 15:04:14 +01:00
Rossen Stoyanchev fbf4724d78 Replace Jetty 9 only constant with explicit value
Closes gh-27121
2021-07-09 20:16:58 +01:00
Sam Brannen a2ef6badc4 Use StringBuilder.append(char) where possible
To slightly improve performance, this commit switches to
StringBuilder.append(char) instead of StringBuilder.append(String)
whenever we append a single character to a StringBuilder.

Closes gh-27098
2021-06-25 10:44:28 +02:00
Juergen Hoeller 23f396a231 Nullability refinements 2021-06-08 14:23:06 +02:00
Rossen Stoyanchev 8d17bcea5b Validate top-level SockJS URL
Closes gh-26933
2021-05-26 11:26:02 +01:00
Rossen Stoyanchev 27c4e74e24 Update CORS Javadoc in spring-websocket
Closes gh-26753
2021-04-13 17:43:40 +01:00
Rossen Stoyanchev 0fd774e69f Add allowedOriginPatterns to WebSocketHandlerRegistration
Closes gh-26593
2021-02-24 09:37:20 +00:00
Rossen Stoyanchev 1dd7d53de0 More precise mapping for WebSocket handshake requests
Closes gh-26565
2021-02-19 11:49:44 +00:00
Juergen Hoeller df977a2fd2 Nullability refinements and related polishing 2021-02-14 17:57:32 +01:00
Rossen Stoyanchev 164b48e25f Polishing STOMP/WebSocket config 2021-02-05 11:53:46 +00:00
Rossen Stoyanchev cf52246319 WebSocketExtension#equals matches sub-classes too
Closes gh-26449
2021-01-27 20:39:44 +00:00
Rossen Stoyanchev aa7584d252 Support for Jetty 10
Closes gh-26123
2021-01-21 20:16:21 +00:00
Juergen Hoeller 1195b3a0b0 Polishing 2020-12-08 10:39:56 +01:00
Sébastien Deleuze 0172424635 Avoid CGLIB proxies on websocket/messaging configurations
This commit updates websocket and messaging configurations in order
to not use CGLIB proxies anymore. The goal here is to allow support
in native executables and to increase the consistency across the
portfolio.

Closes gh-26227
2020-12-07 12:18:29 +01:00
Rossen Stoyanchev 684e695b08 Expose allowedOriginPatterns in SocketJS XML config
Closes gh-26108
2020-11-18 21:20:38 +00:00
Rossen Stoyanchev 8130bf505f Apply allowedOriginPatterns in SockJsService
See gh-26108
2020-11-18 20:57:49 +00:00
Rossen Stoyanchev 9beca06404 Polishing contribution
See gh-26108
2020-11-18 20:25:39 +00:00
Benjamin Faal ae75db2657 Add allowedOriginPatterns to SockJS config
See gh-26108
2020-11-18 19:41:32 +00:00
Rossen Stoyanchev 6bb3ad793e Add isOpen to WebSocketSession in WebFlux
Closes gh-26043
2020-11-09 14:06:43 +00:00
Juergen Hoeller e592634290 Polishing 2020-11-09 13:32:41 +01:00
Rossen Stoyanchev bcd2b9a8a7 Further refine logging in StompErrorHandler
In 5.3.x and forward, completely avoid logging unsent CONNECT messages
that are most likely authentication issues before the session is even
established.

Closes gh-26026
2020-11-05 21:50:12 +00:00
Rossen Stoyanchev 17dd7785f6 Refine logging in StompErrorHandler
Avoid a full stacktrace at ERROR level for a client message that could
not be sent to a MessageChannel.

See gh-26026
2020-11-05 21:34:56 +00:00
Rossen Stoyanchev 3eb2c5e22f Use static accessors in DefaultSimpUserRegistry
Closes gh-26010
2020-11-02 17:25:57 +00:00
Sam Brannen 705cf09ad7 Merge branch '5.2.x' 2020-10-26 15:05:35 +01:00
Sam Brannen 449377908f Fix JUnit 4 to AssertJ migration bugs
The migration from JUnit 4 assertions to AssertJ assertions resulted in
several unnecessary casts from int to long that actually cause
assertions to pass when they should otherwise fail.

This commit fixes all such bugs for the pattern `.isNotEqualTo((long)`.
2020-10-26 14:53:09 +01:00
jacopo-salamina dff9924a0c WebSocketTransportRegistration: javadoc typo
The documentation written for the method WebSocketTransportRegistration.setSendTimeLimit(int timeLimit) mentions that, if no time limit is specified, a default value of 10 seconds is used; however, later on the exact default value employed is incorrectly typed as 10 * 10000 ms, which would result in 100 seconds instead.
The javadoc has been updated in order to show the correct value in milliseconds (10 * 1000).
2020-10-20 12:52:46 +01:00
Rossen Stoyanchev bfb2ce6e2a SimpUser exposes Principal
Closes gh-25191
2020-10-19 21:40:09 +01:00
Сергей Цыпанов 8a04910bdd Drop explicit zeroing at instantiation of Atomic* objects 2020-10-06 15:45:12 +02:00
Brian Clozel e02d3f32b4 Requalify tests as LONG_RUNNING
Prior to this commit, some tests would belong to the PERFORMANCE
`TestGroup`, while they were not testing for performance but rather
performing functional tests that involve long running operations or
timeouts.

This commit moves those tests to the LONG_RUNNING `TestGroup`.

See gh-24830
2020-09-25 13:43:38 +02:00
Juergen Hoeller 214bc407b4 Provide Gson/JSON-B MessageConverter for spring-messaging (aligned with spring-web)
Closes gh-21496
2020-09-25 10:48:25 +02:00
Rossen Stoyanchev dd011c991c Merge branch '5.2.x' into master 2020-09-07 21:41:30 +01:00
Rossen Stoyanchev d616c6632d Remove session on 4xx response from WebSocket handshake
Closes gh-25608
2020-09-07 21:27:52 +01:00
Rossen Stoyanchev a8d953afa4 CloseStatus implements Serializable
Closes gh-25507
2020-08-28 20:43:45 +01:00
Rossen Stoyanchev bb941b6180 OrderedMessageChannelDecorator doesn't preclude send limits
Closes gh-25581
2020-08-28 20:40:55 +01:00
Juergen Hoeller ff11467a0c Avoid resizing of fixed-size HashMap/LinkedHashMap variants
Closes gh-25349
2020-08-25 19:26:18 +02:00
Brian Clozel 9aae5ed3fa Update Reactor Netty modules
Since reactor/reactor-netty#739, the `reactor-netty` module is now split
into two: `reactor-netty-core` and `reactor-netty-http`.

This commit updates the Spring Framework build accordingly.
2020-08-01 11:49:15 +02:00
Sam Brannen 335c3d5db6 Polish contribution
See gh-25445
2020-07-22 17:26:59 +02:00
XenoAmess ab859fcc96 Refine use of substring operations
Closes gh-25445
2020-07-22 17:26:42 +02:00
Sam Brannen a8901e3cf8 Polish contribution
See gh-25445
2020-07-22 16:36:14 +02:00
XenoAmess edfc6c0293 Refine use of substring operations
Closes gh-25445
2020-07-22 16:28:58 +02:00
Sam Brannen ae5913f3b6 Polish tests
See gh-25456
2020-07-22 11:09:52 +02:00
XenoAmess cd12583e13
Use Integer.parseInt instead of Integer.valueOf for primitive int
Closes gh-25456
2020-07-22 10:54:32 +02:00
Sam Brannen 24f9b1d966 Delete unused import 2020-07-22 10:40:59 +02:00
XenoAmess e4a139e70e
Use System.currentTimeMillis() in AbstractSockJsService
Closes gh-25447
2020-07-22 10:39:27 +02:00
XenoAmess 3b12beb1b8
Simplify if-statements with instanceof checks
Closes gh-25449
2020-07-22 10:34:27 +02:00
Rossen Stoyanchev 7ce4d150ce Merge branch '5.2.x' 2020-07-20 18:02:22 +03:00
Juergen Hoeller 64f4703445 Defer creating logger in StandardWebSocketHandlerAdapter to instantiation time
Closes gh-25427
2020-07-20 16:47:32 +02:00
Sam Brannen 9d5881e0ad Suppress warnings, remove unused code, etc. 2020-06-20 17:15:35 +02:00
Сергей Цыпанов 7949937655 Remove redundant assignment of default values to volatile fields 2020-06-17 10:50:51 +02:00
Sam Brannen 8099fc8178 Use try-with-resources language construct where feasible
Closes gh-2063

Co-authored-by: igor-suhorukov <igor.suhorukov@gmail.com>
2020-06-16 22:57:45 +02:00
Juergen Hoeller 9cd9a8e86b Extend readOnlyWebSocketHttpHeaders deprecation to 5.1.16 2020-06-06 14:41:06 +02:00
Rossen Stoyanchev 706446a660 Deprecate unused method 2020-05-08 14:30:10 +01:00
Rossen Stoyanchev 6659e96104 Fix failing test
See gh-24986
2020-05-01 18:20:26 +01:00
Rossen Stoyanchev e17736dd0a Error handling improvement in AbstractSockJsSession
Closes gh-24986
2020-05-01 16:45:25 +01:00
Rossen Stoyanchev f425a993e7 Ignore missing STOMP decoder if session closed
Closes gh-24842
2020-04-27 13:19:43 +01:00
Sam Brannen e26764d249 Remove duplicate words in documentation and polish Javadoc 2020-03-31 12:17:58 +02:00
Sam Brannen 9e30620ac2 Polish contribution
See gh-24805
2020-03-30 13:47:00 +02:00
Сергей Цыпанов e63d1cf12d Improve usage of ByteArrayOutputStream/ByteArrayInputStream
Closes gh-24805
2020-03-30 13:22:21 +02:00
Sam Brannen 6222efc54b Polish contribution
See gh-24785
2020-03-26 16:52:24 +01:00
Сергей Цыпанов 65aa2d03f0 Simplify conversion of ByteArrayOutputStream to String
Closes gh-24785
2020-03-26 16:52:14 +01:00
Qimiao Chen 1f9fa3bab8
Remove useless .gitignore files
Closes gh-24790
2020-03-26 15:53:39 +01:00
Juergen Hoeller fd1ca46ca1 Thread-safe access to WebSocketServerFactory and WebSocketExtensions
See gh-24745
2020-03-23 17:56:14 +01:00
陈其苗 0e5f27c94e Introduce NonNull to package-info 2020-03-23 15:42:02 +01:00
陈其苗 45a629e20a Remove unnecessary check in ConvertingEncoderDecoderSupport 2020-03-20 21:25:29 +00:00
Rossen Stoyanchev fa6ccc066d Do not raise exception for undelivered empty messages
Closes gh-23828
2020-03-13 14:58:31 +00:00
Rossen Stoyanchev 1a8caf9e2b Polishing and minor refactoring
See gh-23828
2020-03-13 14:58:31 +00:00
Rossen Stoyanchev f5df422de9 Polishing contribution
See gh-24470
2020-02-03 20:32:36 +00:00
Hyunjin Choi 273812f9c5 Remove unnecessary escapes in regular expressions
See gh-24470
2020-02-03 20:22:40 +00:00
Sam Brannen 7b6d83a106 Use Gradle test fixture support for spring-web
See gh-23550
2020-01-02 16:01:35 +01:00
Sam Brannen 94f8ef08e2 Move common TestPrincipal to spring-core test fixtures
See gh-23550
2020-01-02 16:01:35 +01:00
Sam Brannen 4260c34b47 Rename test fixture package in spring-core
See gh-23550
2020-01-02 16:01:34 +01:00
Sam Brannen 5718bf424b Use Gradle test fixture support for spring-core
See gh-23550
2020-01-02 16:01:34 +01:00
Rossen Stoyanchev f57f337104 Protected method to decorate WebSocketHandler
See gh-24075
2019-11-26 12:08:22 +00:00
Rossen Stoyanchev 526d89e1e6 Refine Throwable handling in spring-websocket
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
2019-11-26 12:04:00 +00:00
Rossen Stoyanchev 905e3c1f9f Avoid indefinite wait in JettyWebSocketClient
Closes gh-23994
2019-11-14 17:37:10 +00:00
Juergen Hoeller 32532a88c1 Polishing 2019-11-13 16:17:08 +01:00
JohnGrib 8bb165e55c Fix typo in EventSourceTransportHandler
Closes gh-23984

* 3a0f309e2c/spring-web/src/main/java/org/springframework/http/codec/ServerSentEvent.java (L24)
* 3a0f309e2c/spring-web/src/main/java/org/springframework/http/codec/ClientCodecConfigurer.java (L88)
* ef14d76d36/spring-web/src/main/java/org/springframework/http/codec/ServerCodecConfigurer.java (L94)
* 3a0f309e2c/spring-websocket/src/main/java/org/springframework/web/socket/sockjs/transport/handler/EventSourceTransportHandler.java (L33)
2019-11-13 14:23:58 +00:00
Sam Brannen 1a13700f8b Polish contribution
See gh-23923
2019-11-06 12:57:01 +01:00
stsypanov 9da15ee23a Improve usage of String.substring()
Closes gh-23923
2019-11-06 12:57:01 +01:00
Sam Brannen 9f00eb68e9 Clean up warnings 2019-10-30 19:14:58 +01:00
Christoph Dreis 3c17178b16 Fix Mockito deprecations 2019-10-30 18:30:05 +01:00
Rossen Stoyanchev 3895d21b7d Fix failing test after previous commit
See gh-23793
2019-10-30 07:03:51 +00:00
Rossen Stoyanchev 03ac8e6b42 Logging decorator for WebSocketStompClient handler
Closes gh-23793
2019-10-30 06:55:04 +00:00
Rossen Stoyanchev b343e733df Upgrade Jetty to 9.4.21
Make use of the new getAvailableExtensionNames() method.

Closes gh-23565
2019-10-23 16:51:04 +01:00
Juergen Hoeller 2861fc65bd Polishing 2019-09-27 10:17:56 +02:00
Rossen Stoyanchev e93ac7ac75 Merge branch '5.1.x' 2019-09-26 09:07:29 +01:00
Rossen Stoyanchev e9dc5160b9 Use correct log level
See gh-23534
2019-09-26 07:00:27 +01:00
Rossen Stoyanchev 30e1257dda Merge branch '5.1.x' 2019-09-24 13:39:42 +01:00
Rossen Stoyanchev 99d9dacc4f Log sendBufferSizeLimit exceeded at warn
Closes gh-23534
2019-09-24 12:09:41 +01:00
Andy Wilkinson 20e6ca3601 Fix race condition in sendBlockingMessage
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
2019-09-16 14:14:06 +02:00
Phillip Webb d945ae9191 Add blank line between java and javax imports
See gh-23539

Co-authored-by: Sam Brannen <sbrannen@pivotal.io>
2019-09-16 13:41:59 +02:00
Stephane Nicoll facdbdb7b6 Fix checkstyle violation 2019-09-05 09:18:43 +02:00
Phillip Webb deba2ed1b3 Add blank line between java and javax imports
See gh-23539
2019-09-04 22:05:46 -07:00
Phillip Webb 2f106fbb32 Polishing web socket test to use BDD Mockito 2019-09-04 22:05:13 -07:00
Brian Clozel d4089747b8 Use dependency management in Framework build
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
2019-09-02 18:01:09 +02:00
Rossen Stoyanchev 117119a88d Merge branch '5.1.x' 2019-08-29 15:13:36 +03:00
Rossen Stoyanchev c2d71922d7 Fix for change in Jetty 9.4.20.v20190813
Closes gh-23500
2019-08-29 10:52:16 +03:00
Sam Brannen c004ef888c Configure index in @ParameterizedTest display names
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
2019-08-28 17:06:23 +02:00
Sam Brannen ad6231ad29 Add missing @Override annotations 2019-08-23 13:50:58 +02:00
Sam Brannen 617863ae4b Polish WebSocket integration tests 2019-08-20 12:43:31 +02:00
Sam Brannen 288461a541 Introduce @EnabledForTestGroups in Spring's test suite
Closes gh-23476
2019-08-17 14:47:24 +02:00
Sam Brannen 3f3e41923f Migrate rest of test suite from JUnit 4 to JUnit Jupiter
This commit migrates the rest of Spring's test suite to JUnit Jupiter,
except spring-test which will be migrated in a separate commit.

See gh-23451
2019-08-17 11:36:58 +02:00
Sam Brannen 38f6d270f8 Delete dead code in tests 2019-07-18 12:20:26 +02:00
Rob Winch fde92793b5 Fix http URLs
See gh-22839
2019-07-11 18:14:20 +02:00
Сергей Цыпанов 1728bf17fc Avoid unnecessary boxing where primitives can be used
Closes gh-23267
2019-07-10 16:51:18 +02:00
Rossen Stoyanchev 3d913b8134 Merge branch '5.1.x' 2019-07-03 17:25:12 +01:00
Rossen Stoyanchev 4e6e47b726 Earlier detection of token authentication
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
2019-07-03 15:24:27 +01:00
Rossen Stoyanchev 5af9a8edae Ensure WebSocketHttpRequestHandler writes headers
Closes gh-23179
2019-07-03 15:24:27 +01:00
Sam Brannen d0231cb29a Presort beans in ControllerAdviceBean.findAnnotatedBeans()
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
2019-06-24 16:26:11 +03:00
Rossen Stoyanchev b296545af8 Handler StreamingHttpOutputMessage in XHR transport
Closes gh-23030
2019-06-07 16:40:58 -04:00
Sebastien Deleuze 098ac0bbb8 Annotate Object#equals parameter with @Nullable
Closes gh-23093
2019-06-06 14:18:30 +02:00
Sam Brannen 1259b7cb49 Polishing 2019-06-05 14:41:14 +03:00
Rossen Stoyanchev e89fd5c3be Merge branch '5.1.x' 2019-06-03 16:34:58 -04:00
Rossen Stoyanchev d2ec876f57 Consistently close connection after ERROR frame
Closes gh-23039
2019-06-03 16:22:43 -04:00
Sam Brannen 141ef9082f Clean up Mockito usage
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.
2019-05-28 13:59:43 +02:00
Phillip Webb 9d74da006c Migrate JUnit 4 assertions to AssertJ
Migrate all existing JUnit 4 `assert...` based assertions to AssertJ
and add a checkstyle rule to ensure they don't return.

See gh-23022
2019-05-23 15:52:49 -07:00
Phillip Webb 95a9d46a87 Migrate Hamcrest assertions to AssertJ
Migrate all existing `assertThat(..., Matcher)` assertions to AssertJ
and add checkstyle rules to ensure they don't return.

See gh-23022
2019-05-23 15:49:59 -07:00
Rossen Stoyanchev 2294625cf0 Exposes STOMP frame stats
Closes gh-23015
2019-05-23 18:32:11 -04:00
Rossen Stoyanchev e09c5fd9e5 Use TaskExecutor instead of ThreadPoolTaskExecutor
Closes gh-22943
2019-05-23 14:26:51 -04:00
Rossen Stoyanchev 0b2fcbfe8a Use TaskScheduler instead of ThreadPoolTaskScheduler
Closes gh-22943
2019-05-23 14:01:05 -04:00
Juergen Hoeller c329bad42a Merge branch '5.1.x' 2019-05-21 00:16:35 +02:00
Juergen Hoeller 8cd3daad0d Polishing 2019-05-21 00:15:40 +02:00
Juergen Hoeller 171e8f56a3 Merge branch '5.1.x' 2019-05-20 22:27:37 +02:00
Juergen Hoeller 75d751d968 Polishing 2019-05-20 22:19:11 +02:00
stsypanov 6f07a504b8 A couple of trivial simplifications 2019-05-20 21:41:15 +02:00