Commit Graph

3451 Commits

Author SHA1 Message Date
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
Rossen Stoyanchev a40cc8bbe0 Polishing contribution
Closes gh-25647
2020-10-23 18:27:49 +01:00
Riley Park 6e640c806f Improve support for Content-Disposition types
See gh-25647
2020-10-23 18:16:05 +01:00
Rossen Stoyanchev e66e34766e Support Optional in UriComponentsBuilder#queryParam
Closes gh-25951
2020-10-23 18:09:22 +01:00
Rossen Stoyanchev 5644a7aebb Polishing contribution
Closes gh-25951
2020-10-23 17:43:17 +01:00
Robin Roos 7af726480f Add queryParamIfPresent to UriComponentsBuilder
See gh-25951
2020-10-23 17:07:39 +01:00
Juergen Hoeller 621295dbd8 Deprecate StringUtils.isEmpty(Object) and replace remaining usage
Closes gh-25945
2020-10-21 16:09:26 +02:00
Brian Clozel bd91dc70d5 Merge branch '5.2.x' 2020-10-20 15:41:02 +02:00
Brian Clozel 7bee3d1574 Optimize Jackson resource management in codecs
Prior to this commit, references to `JsonGenerator` and
`ByteArrayBuilder` were not closed/released within codecs calls.
This prevents Jackson from reusing more efficiently shared memory
resources.

This commit properly closes/releases Jackson resources in Spring MVC,
Spring WebFlux and Spring Messaging codecs.
A benchmark on WebFlux codecs (in both single value/streaming mode)
shows significant throughput and allocation improvements for small
payloads.

Closes gh-25910
2020-10-20 15:36:23 +02:00
Juergen Hoeller 23211c784e Upgrade to Netty 4.1.53 and Tomcat 9.0.39
Correct version declaration for Apache HttpClient 5 and its reactive module.
2020-10-16 12:20:15 +02:00
Rossen Stoyanchev 4952336419 Polishing contribution
See gh-25856
2020-10-15 17:14:27 +01:00
Rostislav Svoboda babcbd0d2b Simplify code for SimpleClientHttpRequestFactory.prepareConnection 2020-10-15 17:14:27 +01:00
Rossen Stoyanchev 7e647ab1d8 HttpHeadResponseDecorator sets Content-Length for Mono only
See gh-25908
2020-10-13 23:45:51 +01:00
Rossen Stoyanchev abd79d43af Merge branch '5.2.x' into master 2020-10-13 23:42:43 +01:00
Rossen Stoyanchev 431ec906c4 Ensure buffers released in HttpHeadResponseDecorator
See gh-25908
2020-10-13 23:38:59 +01:00
Rossen Stoyanchev 1d96f6a266 HttpHeaderResponseDecorator checks for "Transfer-Encoding"
This commit extends the fix from b86c11cc9b
by checking for both existing Content-Length and Transfer-Encoding.

Closes gh-25908
2020-10-13 23:06:06 +01:00
Juergen Hoeller cd835b3124 Merge branch '5.2.x'
# Conflicts:
#	spring-web/src/test/java/org/springframework/http/converter/json/Jackson2ObjectMapperBuilderTests.java
#	spring-web/src/test/java/org/springframework/http/converter/json/Jackson2ObjectMapperFactoryBeanTests.java
2020-10-13 11:35:36 +02:00
Juergen Hoeller 7b6293fa05 Avoid outdated Jackson API in tests
See gh-25907
2020-10-13 11:13:54 +02:00
Juergen Hoeller a6e48811c0 Compatibility with Jackson 2.12 (tested against 2.12.0-rc1)
Closes gh-25907
2020-10-13 11:04:55 +02:00
Juergen Hoeller 379d9167d9 Merge branch '5.2.x'
# Conflicts:
#	build.gradle
2020-10-13 01:41:48 +02:00
Juergen Hoeller 06b6a4be16 Polishing 2020-10-13 01:39:12 +02:00
Juergen Hoeller e9cd37a4ee Merge branch '5.2.x'
# Conflicts:
#	spring-webflux/src/main/java/org/springframework/web/reactive/result/method/InvocableHandlerMethod.java
2020-10-13 00:25:04 +02:00
Juergen Hoeller f3f19504c6 Polishing 2020-10-13 00:21:07 +02:00
Juergen Hoeller 7f365942a5 Nullability refinements and related polishing 2020-10-13 00:08:15 +02:00
Juergen Hoeller 1b63c31722 Avoid creation of unnecessary logger instances in web request abstraction
Closes gh-25900
2020-10-13 00:06:38 +02:00
Juergen Hoeller a9d458f5fc Merge branch '5.2.x' 2020-10-12 19:54:21 +02:00
Juergen Hoeller e176c4e799 Polishing 2020-10-12 19:40:50 +02:00
Juergen Hoeller ca2b412905 Merge branch '5.2.x' 2020-10-12 18:36:35 +02:00
Juergen Hoeller 66a67ec807 Polishing 2020-10-12 18:26:14 +02:00
Juergen Hoeller 69c330d905 Attempt fallback Part resolution even without StandardMultipartHttpServletRequest
Closes gh-25829
2020-10-12 18:25:55 +02:00
Juergen Hoeller 21f2863d8e ControllerAdvice resolution detects @Order declared on @Bean method as well
Closes gh-25872
2020-10-12 18:07:17 +02:00
Juergen Hoeller 83bfee9201 Return null in case of no matching part even for array/collection parameter
Closes gh-25819
2020-10-12 18:07:17 +02:00
Juergen Hoeller 50b9542402 Apply handleMissingValue in case of null conversion result as well
Closes gh-23939
2020-10-12 18:07:17 +02:00
Rossen Stoyanchev 5b1b20c8c0 Polishing and minor refactoring
See gh-25884
2020-10-12 11:55:20 +01:00
Rossen Stoyanchev e73e489fd8 Remove use of MonoProcessor.fromSinks
See gh-25884
2020-10-09 20:46:21 +01:00
Sébastien Deleuze c4de445822 Upgrade to kotlinx.serialization 1.0.0 2020-10-09 12:41:52 +02:00
Sébastien Deleuze 94a42a3086 Support suspending handler methods in Spring MVC
This commit adds support for Kotlin Coroutines suspending functions to
Spring MVC, by converting those to a Mono that can then be handled by
the asynchronous request processing feature.

It also optimizes Coroutines detection with the introduction of an
optimized KotlinDetector.isSuspendingFunction() method that does not
require kotlin-reflect.

Closes gh-23611
2020-10-09 12:25:32 +02:00
Rossen Stoyanchev fee8abfa5f Drop "[]" from parameter names in data binding
Closes gh-25836
2020-10-07 16:44:58 +01:00
Rossen Stoyanchev 1c1bc41e24 Merge branch '5.2.x' into master 2020-10-07 12:45:51 +01:00
Rossen Stoyanchev eb11c6fa23 Reinstate removal of jsessionid from lookup path
Closes gh-25864
2020-10-07 11:31:52 +01:00
Sébastien Deleuze 9990bd2ea8 Fix checkstyle errors
See gh-25771
2020-10-06 23:13:38 +02:00
Sébastien Deleuze 92b2c45281 Add kotlinx.serialization JSON support to Spring WebFlux
Flow decoding is not supported yet since it depends on
kotlin/kotlinx.serialization#1073, but it will be
enabled when this issue will be fixed.

Closes gh-25771
2020-10-06 23:02:33 +02:00
Rossen Stoyanchev 1cd8871d7f FormHttpMessageConverter preserves MediaType parameters
Closes gh-25839
2020-10-06 18:28:39 +01:00
Rossen Stoyanchev 1c5b95db0b Revert workaround in Jetty connector
The workaround was removed in the 5.3 milestone phase and in master
only because the referenced Jetty issue is marked fixed. However,
what we need to replace it with should be a little more involved
and also it's not entirely clear if the fixes in Jetty aligns with
our release and retain semantics so that needs to be investigated
more thoroughly.
2020-10-06 18:18:26 +01:00
Сергей Цыпанов 8a04910bdd Drop explicit zeroing at instantiation of Atomic* objects 2020-10-06 15:45:12 +02:00
Juergen Hoeller b7e1553c9d Merge branch '5.2.x'
# Conflicts:
#	build.gradle
#	spring-orm/src/main/java/org/springframework/orm/hibernate5/LocalSessionFactoryBuilder.java
2020-10-06 15:37:54 +02:00
Juergen Hoeller f83bb7183e Polishing 2020-10-06 15:31:34 +02:00
Rossen Stoyanchev d3087537d5 Merge branch '5.2.x' into master 2020-10-02 14:39:27 +01:00
Rossen Stoyanchev 2533ba5253 Use Mono.fromDirect for Jetty ReactiveRespnose
Closes gh-25849
2020-10-02 13:43:42 +01:00