Commit Graph

922 Commits

Author SHA1 Message Date
Marc Wrobel 03f0c57704 Fix and improve Javadoc in spring-websocket
Closes gh-28788
2022-07-11 21:30:32 +02:00
rstoyanchev 007bdede46 Add missing check to avoid re-initialization
Noticed during review of #28736 that a check protecting against
re-initialization was accidentally removed in commit
3d6e38bb43.
2022-07-04 16:17:57 +01:00
rstoyanchev 22cc6c5918 Polishing contribution
Closes gh-28736
2022-07-04 16:12:57 +01:00
CodeInDreams 461ba53b39 Qualify channelExecutor and taskScheduler in WebSocket config
See gh-28736
2022-07-04 15:51:40 +01:00
Sam Brannen 59c7bb1f86 Use Arrays.toString instead of Arrays.asList when generating Strings 2022-05-17 15:36:31 +02:00
Sam Brannen 1c10cdd1e8 Update copyright dates
See gh-28433
2022-05-10 11:33:32 +02:00
evgeny.bovykin 941b92cbed Make inner classes static when feasible
A static nested class does not keep an implicit reference to its
enclosing instance.

This prevents a common cause of memory leaks and uses less memory per
instance of the class.

Closes gh-28433
2022-05-10 11:32:37 +02:00
Sam Brannen c462fe30ed Use Named arguments in parameterized tests 2022-03-16 14:45:47 +01:00
rstoyanchev 11cb938232 Polishing contribution
Closes gh-28000
2022-02-14 20:51:02 +00:00
Ivan Zbykovskyi f004bb1b64 Add formatting for SockJS GoAway frame
Prevents infinite loop for xhr-polling and xhr-streaming transports.

See gh-28000
2022-02-14 20:51:02 +00:00
Sam Brannen f8a5a8d7be Use modern language features in tests 2022-02-03 14:50:10 +01:00
rstoyanchev 7067461d71 Fix exception in Jetty10RequestUpgradeStrategy
Closes gh-27899
2022-01-12 15:04:05 +00:00
Sam Brannen df263d01b9 Use idiomatic AssertJ assertions for true, false, and null 2022-01-10 14:15:55 +01:00
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
Rossen Stoyanchev e9083d7d20 Apply LogFormatUtils in more places 2021-12-09 14:53:52 +00: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
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
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