Phillip Webb
02850f357f
Migrate exception checking tests to use AssertJ
...
Migrate tests that use `@Test(expectedException=...)` or
`try...fail...catch` to use AssertJ's `assertThatException`
instead.
2019-05-20 10:47:53 -07:00
Rossen Stoyanchev
ed2a3bd451
Take advantage of Encoder#encodeValue
...
EncoderHttpMessageWriter takes advantage of the Encoder#encodeValue
that's new in 5.2 in order to produce a Mono<DataBuffer> instead of
producing a Flux<DataBuffer> and then using flux.singleOrEmpty().
Closes gh-22952
2019-05-15 17:31:59 -04:00
Rossen Stoyanchev
013249757a
Merge branch '5.1.x'
2019-05-15 16:44:05 -04:00
Rossen Stoyanchev
0274752fe9
Use singleOrEmpty to avoid upstream cancel
...
Closes gh-22952
2019-05-15 16:02:28 -04:00
Rossen Stoyanchev
afc0ae3752
Add hasPatternSyntax method to PathPattern
2019-05-14 15:36:47 -04:00
Sam Brannen
73dbd06361
Enforces static imports for JUnit 4 assertions and assumptions
...
This commit configures Checkstyle to enforces static imports for JUnit 4
assertions and assumptions.
See gh-22932
2019-05-12 15:13:07 +02:00
Sam Brannen
deecab6311
Use assertThat from Hamcrest instead of JUnit 4
...
org.junit.Assert.assertThat() is deprecated as of JUnit 4.13.
See gh-22894
2019-05-12 14:46:55 +02:00
Sam Brannen
724c805211
Discontinue use of JUnit 3 APIs
...
This commit also ensures that the JSR-330 TCK is executed with the
normal build by adhering to naming conventions for test classes.
See gh-22894
2019-05-12 14:46:55 +02:00
Sam Brannen
9b61316c2e
Clean up warnings in spring-web
2019-05-10 17:31:23 +02:00
Sam Brannen
d8f1d56100
Fix broken test
2019-05-09 16:21:54 +02:00
Sebastien Deleuze
c601ecf169
Merge branch '5.1.x'
2019-05-09 15:00:53 +02:00
Sebastien Deleuze
c8d49ed284
Fix EncoderHttpMessageWriter.isStreamingMediaType()
...
Closes gh-22936
2019-05-09 14:57:15 +02:00
Sam Brannen
e465f51d56
Suppress deprecation warnings
2019-05-09 13:21:42 +02:00
Phillip Webb
798b51f4a3
Migrate to BDD Mockito
...
Migrate all tests to consistently use BDD Mockito. Also add
checksyle rule to enforce going forwards.
2019-05-08 13:46:13 -07:00
Phillip Webb
816bbee8de
Remove '.*' imports from tests
...
Organize test imports to expand all '.*' static imports into
fully qualified imports.
This update will allow us to use additional checkstyle rules in
the future, and will also help if we migrate fully to AssertJ.
2019-05-08 09:55:09 -07:00
Juergen Hoeller
82d32f0875
Remove unused import
2019-05-08 17:51:54 +02:00
Rossen Stoyanchev
44659f4945
Unwrap Part content in asyncPart builder method
...
Closes gh-22876
2019-05-08 10:59:58 -04:00
Phil Webb
d7320de871
Migrate away from ExpectedException ( #22922 )
...
* Add limited checkstyles to test code
Add a limited set of checkstyle rules to the test codebase to improve
code consistency.
* Fix checksyle violations in test code
* Organize imports to fix checkstyle for test code
* Migrate to assertThatExceptionOfType
Migrate aware from ExpectedException rules to AssertJ exception
assertions. Also include a checkstyle rules to ensure that the
the ExpectedException is not accidentally used in the future.
See gh-22894
2019-05-08 16:25:52 +02:00
Rossen Stoyanchev
7e6e3d7027
Switch writeAcceptCharset to false by default
...
Closes gh-22506
2019-05-08 09:56:52 -04:00
Arjen Poutsma
e7cca7792d
Add way to override default multipartReader
...
This commit introduces a way to override the default multipart reader,
for instance to the SynchronossPartHttpMessageReader.
2019-05-08 12:10:20 +02:00
Arjen Poutsma
fb642ce723
Introduce DefaultMultipartMessageReader
...
This commit introduces the DefaultMultipartMessageReader, a fully
reactive multipart parser that does have any third party dependencies.
Closes gh-21659
2019-05-07 12:14:45 +02:00
Sam Brannen
d616e10dca
Use assertThat from Hamcrest instead of JUnit 4
...
org.junit.Assert.assertThat() is deprecated as of JUnit 4.13.
See gh-22894
2019-05-05 19:26:04 +02:00
Juergen Hoeller
ec8689d1fc
Merge branch '5.1.x'
2019-05-03 14:23:59 +02:00
Juergen Hoeller
4e10735e8f
MockHttpServletRequest restores default locale for empty accept header
...
Closes gh-22877
2019-05-03 14:08:12 +02:00
Sebastien Deleuze
89454e69c3
Deprecate MediaType.APPLICATION_JSON_UTF8
...
This commit deprecates MediaType.APPLICATION_JSON_UTF8 and
MediaType.APPLICATION_PROBLEM_JSON_UTF8 in favor of
MediaType.APPLICATION_JSON and MediaType.APPLICATION_PROBLEM_JSON since
UTF-8 encoding is now handled correctly by most browsers
(related bug has been fixed in Chrome since September 2017).
MediaType.APPLICATION_JSON is now used as the default JSON content type.
Closes gh-22788
2019-04-30 16:11:50 +02:00
Sebastien Deleuze
5cd6763193
Add CBOR codec (single value only)
...
This commit adds CBOR reactive support for single value only in
order to allow CBOR usage in RSocket. Notice that no CBOR support
is configured on WebFlux, this will require gh-20513 to be resolved.
Closes gh-22767
2019-04-29 13:13:37 +02:00
Phillip Webb
55ac110f7b
Fix LinkedCaseInsensitiveMap collection methods
...
Ensure that results returned from keySet, entrySet & values are tracked
to remove case insensitive keys from the source map.
Closes gh-22821
2019-04-26 11:17:51 -07:00
Sam Brannen
e5d64e6680
Remove dead code in HttpHeadersTests
2019-04-21 15:33:53 +02:00
Sam Brannen
e187a42bfc
Introduce failing tests for HttpHeaders
...
See gh-22821
2019-04-21 15:20:24 +02:00
Rossen Stoyanchev
de3238dbea
Merge branch '5.1.x'
2019-04-16 21:08:54 -04:00
Rossen Stoyanchev
5b711a964b
Pass Mono to Reactor Netty when feasible
...
Closes gh-22800
2019-04-16 20:52:19 -04:00
Rossen Stoyanchev
375090bb7c
LeakAwareDataBuffer related fixes
...
Following on 3ebbfa2191 where the local
refCount was removed in favor of using the internal refCount of the
native data buffer, this commit ensures that LeakAwareDataBufferFactory
uses a PooledDataBufferFactory delegate by default.
There are also fixes for test issues with eager allocation uncovered by
these changes in StringDecoder and ResourceDecoder.
2019-04-16 20:52:19 -04:00
Rossen Stoyanchev
ed650891ca
Add filter to add exchange to Reactor Context
...
Closes gh-21746
2019-04-16 10:08:20 -04:00
Rossen Stoyanchev
e4da7cb47f
Merge branch '5.1.x'
2019-04-15 08:41:27 -04:00
Rossen Stoyanchev
0109231d8e
Ensure Jackson generator flushed
...
Closes gh-22771
2019-04-15 08:40:19 -04:00
Juergen Hoeller
44df98c82d
Merge branch '5.1.x'
2019-04-12 11:37:07 +02:00
Juergen Hoeller
b07d46da99
MockCookie compares attributes in case-insensitive manner
...
Closes gh-22786
2019-04-12 11:10:02 +02:00
Rossen Stoyanchev
5fc18064f2
Use encode with an Object value where feasible
...
Closes gh-22782
2019-04-11 19:00:28 -04:00
Rossen Stoyanchev
d707d382b4
Merge branch '5.1.x'
2019-04-09 22:38:15 -04:00
Rossen Stoyanchev
bd956ed75a
DataBuffer fixes in Protobuf codecs
...
Closes gh-22731
2019-04-09 17:00:26 -04:00
Juergen Hoeller
eb971690d2
Merge branch '5.1.x'
2019-04-09 18:09:20 +02:00
Juergen Hoeller
2835424f9d
Jackson2Tokenizer creates fully configured DeserializationContext
...
Closes gh-22510
2019-04-09 17:59:10 +02:00
Juergen Hoeller
c8609b83b6
Merge branch '5.1.x'
2019-04-08 20:19:03 +02:00
Juergen Hoeller
4ec9aff01d
Polishing
2019-04-08 19:59:06 +02:00
Sebastien Deleuze
2e7ed915cd
Merge branch '5.1.x'
2019-04-08 15:46:47 +02:00
Sebastien Deleuze
a089027e7d
Fix a regression in Jackson builder module registration
...
This commit brings back the support for registration of multiple
Jackson modules with a null typeId.
Closes gh-22740
2019-04-08 15:37:10 +02:00
Rossen Stoyanchev
89a29598d5
Merge branch '5.1.x'
2019-04-02 11:05:30 -04:00
Rossen Stoyanchev
4c08863776
Add test case for writeFunction error signal
...
See gh-22720
2019-04-02 11:00:58 -04:00
Juergen Hoeller
4a5b9d39d4
Consistent java.time setters on HttpHeaders and CorsConfiguration
...
Closes gh-22546
2019-04-02 14:56:20 +02:00
Juergen Hoeller
03bda29032
Revert "AnnotationConfigRegistry exposes registerBean with supplier/qualifiers"
...
This reverts commit 18f2e6a1
2019-04-02 14:55:13 +02:00