Commit Graph

999 Commits

Author SHA1 Message Date
Sébastien Deleuze 3c354a9b18 Avoid using Mockito argument matcher in Mockk test 2020-04-07 16:38:09 +02:00
陈其苗 13970ae528 Use autoboxing instead of explicit wrapping in tests
Closes gh-24801
2020-04-01 14:34:20 +02:00
Rossen Stoyanchev 95ef9c25c2 Reduce byte[] allocations in StompEncoder
Closes gh-24694
2020-03-31 12:56:10 +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
Qimiao Chen 7c831d2ef4
Replace anonymous inner classes with lambdas in tests
Closes gh-24808
2020-03-30 12:02:23 +02:00
Rossen Stoyanchev 3175f0771e Remove dumpString from DataBufferTestUtils
See gh-24786
2020-03-26 21:42:12 +00: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 09b36380cd
Fix typos in source files
Closes gh-24746
2020-03-20 20:06:52 +01:00
Rossen Stoyanchev 7efb62091d MessagingRSocket correctly handles unconsumed input
Closes gh-24741
2020-03-20 10:03:56 +00:00
Rossen Stoyanchev 5b27df772a Suppress deprecation warning
See gh-24725
2020-03-19 07:21:21 +00:00
Sam Brannen a8feb792da Fix broken Javadoc links 2020-03-16 16:30:27 +01:00
Rossen Stoyanchev 4aedf2ea13 MetadataEncoder expands vars correctly
Closes gh-24656
2020-03-12 11:35:08 +00:00
ZhangT c5fb7b9fb7
Simplify some redundant code
Closes gh-24586

Co-authored-by: Sam Brannen <sbrannen@pivotal.io>
2020-02-26 12:29:09 +01:00
Hyunjin Choi ede2a1d4b2 Remove unnecessary semicolon in some enum classes 2020-02-24 14:56:12 +01:00
Rossen Stoyanchev 28a95e89f3 Upgrade to Dysprosium SR5 snapshots
See gh-24355
2020-02-11 12:52:04 +00:00
Rossen Stoyanchev 3c0c0c0597 Fix issue with new line handling in StompDecoder
Closes gh-23713
2020-01-16 14:54:10 +00: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
Sam Brannen 1b4fd1cba1 Polishing 2019-12-22 16:00:45 +01:00
Sébastien Deleuze 0f41536820 Fix RSocketRequester Coroutines extensions
After gh-24073, some Coroutines extensions should be applied on
RetrieveSpec instead of RequestSpec.

Closes gh-24166
2019-12-09 11:50:06 +01:00
Sam Brannen 55ae3c5e87 Polishing 2019-12-07 12:59:03 +01:00
Brian Clozel d4209392d2 Allow ExchangeStrategies customizations in WebClient
Prior to this commit, developers could configure their WebClient to use
their custom `ExchangeStrategies`, by providing it in the
`WebClient.Builder` chain.
Once created, an `ExchangeStrategies` instance is not mutable, which
makes it hard for further customizations by other components. In the
case of the reported issue, other components would override the default
configuration for the codecs maxInMemorySize.

This commit makes the `ExchangeStrategies` mutable and uses that fact to
further customize them with a new `WebClient.Builder#exchangeStrategies`
`Consumer` variant. This commit is also deprecating those mutating
variants in favor of a new `WebClient.Builder#exchangeStrategies` that
takes a `ExchangeStrategies#Builder` directly and avoids mutation issues
altogether.

Closes gh-23961
2019-12-02 14:12:59 +00:00
Brian Clozel 1560bbd81e Revert "Allow ExchangeStrategies customizations in WebClient"
This reverts commit b3020bc484.
2019-12-02 10:39:53 +01:00
Juergen Hoeller 567c7695dd Polishing 2019-12-01 00:20:00 +01:00
Brian Clozel b3020bc484 Allow ExchangeStrategies customizations in WebClient
Prior to this commit, developers could configure their WebClient to use
their custom `ExchangeStrategies`, by providing it in the
`WebClient.Builder` chain.
Once created, an `ExchangeStrategies` instance is not mutable, which
makes it hard for further customizations by other components. In the
case of the reported issue, other components would override the default
configuration for the codecs maxInMemorySize.

This commit makes the `ExchangeStrategies` mutable and uses that fact to
further customize them with a new `WebClient.Builder#exchangeStrategies`
`Consumer` variant. This commit is also deprecating those mutating
variants in favor of a new `WebClient.Builder#exchangeStrategies` that
takes a `ExchangeStrategies#Builder` directly and avoids mutation issues
altogether.

Closes gh-23961
2019-11-29 22:26:52 +01:00
Rossen Stoyanchev 25f3465f1f Polishing contribution
See gh-24087
2019-11-29 15:53:37 +00:00
Parviz ROzikov e858b21c60 #24022 - added protobuf MessageConverter 2019-11-29 14:20:05 +00:00
Rossen Stoyanchev 26d800cc93 Fix empty payload handling in RSocketRequester
Closes gh-24088
2019-11-27 07:35:45 +00:00
Rossen Stoyanchev 30d68f2de7 Reject user names with "%2F" in STOMP
Closes gh-23836
2019-11-26 16:21:48 +00:00
Rossen Stoyanchev 6ed1b5835b Separate step for retrieve in RSocketRequester
Closes gh-24073
2019-11-25 11:47:41 +00:00
Sébastien Deleuze 712eac2915 Refine Coroutines annotated controller support
This commit refines Coroutines annotated controller support
by considering Kotlin Unit as Java void and using the right
ReactiveAdapter to support all use cases, including suspending
functions that return Flow (usual when using APIs like WebClient).

It also fixes RSocket fire and forget handling and adds related tests
for that use case.

Closes gh-24057
Closes gh-23866
2019-11-22 14:13:17 +01:00
Rossen Stoyanchev 996f7290cf Allow async metadata in RSocketRequester
This commit allows single-value async producers for the values of
metadata entries in both the SETUP and for requests. The same is also
enabled for data in the SETUP frame.

Close gh-23640
2019-11-20 19:41:16 +00:00
Rossen Stoyanchev f08cf0e864 Add RSocketFrameTypeMessageCondition constants
See gh-23999
2019-11-19 16:03:56 +00:00
Rossen Stoyanchev 842b424acd Use method signature to refine RSocket @MessageMapping
Before this change an @MessageMapping could be matched to any RSocket
interaction type, which is arguably too flexible, makes it difficult to
reason what would happen in case of a significant mismatch of
cardinality, e.g. request for Fire-And-Forget (1-to-0) mapped to a
method that returns Flux, and could result in payloads being ignored,
or not seen unintentionally.

This commit checks @ConnectMapping method on startup and rejects them
if they return any values (sync or async). It also refines each
@MessageMapping to match only the RSocket interaction type it fits
based on the input and output cardinality of the handler method.
Subsequently if a request is not matched, we'll do a second search to
identify partial matches (by route only) and raise a helpful error that
explains which interaction type is actually supported.

The reference docs has been updated to explain the options.

Closes gh-23999
2019-11-18 17:27:41 +00:00
Rossen Stoyanchev 32f82c0ed0 Polishing 2019-11-08 17:47:59 +00:00
Ilja 08f1cb454a Allow sending headers with the disconnect frame 2019-11-08 17:41:39 +00:00
Rossen Stoyanchev b2b02ad7a1 Polishing 2019-11-08 15:03:53 +00:00
Ilya Lukyanovich 801cca8cf8 Preserve ErrorMessage#getOriginalMessage()
See gh-23417
2019-11-08 15:03:53 +00:00
Rossen Stoyanchev 0e1a237139 Polishing 2019-11-08 09:17:25 +00:00
Johnny Lim 91f5f42d13 Add tests for PrincipalMethodArgumentResolver 2019-11-08 08:48:56 +00:00
Rossen Stoyanchev 005d2018d4 Refine changes for PR
Closes gh-23882
2019-10-31 14:14:44 +00:00
Dekel Pilli 64f2beb9bf Fixing NPE in AbstractNamedValueMethodArgumentResolver
See gh-23882
2019-10-31 14:13:44 +00: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
Juergen Hoeller 19ff7d84ab Polishing 2019-10-30 14:31:46 +01:00
Sebastien Deleuze 9f242fac66 Add RSocketRequester retrieveAndAwaitOrNull extension
Closes gh-23874
2019-10-27 20:11:08 +01:00