Commit Graph

858 Commits

Author SHA1 Message Date
Rossen Stoyanchev
96a7fc693b Apply LogFormatUtils in more places 2021-12-09 16:07:20 +00:00
Juergen Hoeller
e31d66cd2b Polishing (backported from 5.3.x) 2021-09-02 23:18:36 +02:00
Sam Brannen
f56d6ea1fb 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-26 11:50:27 +02:00
Rossen Stoyanchev
698e74f7cd WebSocketExtension#equals matches sub-classes too
Closes gh-26449
2021-01-29 20:48:51 +00:00
Juergen Hoeller
cde95e1446 Polishing 2020-11-09 13:52:34 +01:00
Rossen Stoyanchev
010d0947c7 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:51:16 +00:00
Rossen Stoyanchev
b4f8fc8177 Use static accessors in DefaultSimpUserRegistry
Closes gh-26010
2020-11-02 17:32:12 +00: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
Rossen Stoyanchev
d616c6632d Remove session on 4xx response from WebSocket handshake
Closes gh-25608
2020-09-07 21:27:52 +01: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
Juergen Hoeller
64f4703445 Defer creating logger in StandardWebSocketHandlerAdapter to instantiation time
Closes gh-25427
2020-07-20 16:47:32 +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