Commit Graph

22006 Commits

Author SHA1 Message Date
Brian Clozel
83c19cd60e Fix NPE when calling NettyHeadersAdapter.add()
Prior to this commit, the `NettyHeadersAdapter` would directly delegate
the `add()` and `set()` calls to the adapted
`io.netty.handler.codec.http.HttpHeaders`. This implementation rejects
`null` values with exceptions.

This commit aligns the behavior here with other implementations, by not
rejecting null values but simply ignoring them.

Fixes gh-26274
2020-12-15 13:23:53 +01:00
Rossen Stoyanchev
bcfbde9848 Parse parts in MockMultipartHttpServletRequestBuilder
Closes gh-26261
2020-12-14 21:13:29 +00:00
izeye
17e6cf1cc1 Replace AtomicReference<Boolean> with AtomicBoolean in AbstractServerHttpResponse.writeWith() 2020-12-12 10:40:05 +01:00
Juergen Hoeller
ec33b4241a Upgrade to Netty 4.1.55, Tomcat 9.0.41, Caffeine 2.8.8 2020-12-11 11:53:53 +01:00
Brian Clozel
657641ebaa Remove JDK14 CI variant from build pipeline 2020-12-11 11:08:33 +01:00
Brian Clozel
4597e9b547 Upgrade CI container images to Ubuntu Focal 2020-12-11 09:46:00 +01:00
Brian Clozel
721dacca5a Upgrade JDK8, JDK11 and JDK15 versions in CI build 2020-12-11 09:45:21 +01:00
alexscari
9d124fffcb Fix typo in Javadoc for AbstractJdbcCall
Closes gh-26254
2020-12-10 17:32:58 +01:00
Juergen Hoeller
2a47751fcd Defensively handle loadClass null result in BeanUtils.findEditorByConvention
Closes gh-26252
2020-12-10 16:24:32 +01:00
Spring Buildmaster
06e352822a Next development version (v5.3.3-SNAPSHOT) 2020-12-09 06:11:23 +00:00
Rossen Stoyanchev
25101fb034 Additional fixes for discarding data buffers
Closes gh-26232
2020-12-08 21:33:50 +00:00
Rossen Stoyanchev
cb44ae62e9 Additional DataBuffer hints
See gh-26230
2020-12-08 18:43:54 +00:00
Juergen Hoeller
01fb4dbeba Polishing
See gh-26237
2020-12-08 14:59:10 +01:00
fengyuanwei
07fadae27d Remove duplicate "property" in PropertyCacheKey.toString() 2020-12-08 14:49:33 +01:00
Arjen Poutsma
2b77c08e09 Clear path pattern in HandlerMapping
This commit refactors cb2b141d31 to move
the cleaning code from a DeferredResultProcessingInterceptor to the
RouterFunctionMapping.

See gh-26239
2020-12-08 13:06:45 +01:00
Arjen Poutsma
cb2b141d31 Clear path pattern after async result
This commit makes sure that the matching pattern attributes is cleared
when an async result has been obtained, so that the subsequent
dispatch starts from scratch.

Closes gh-26239
2020-12-08 12:08:56 +01:00
Brian Clozel
3b92d45984 Upgrade reference docs dependencies
This commit upgrades the spring-doc-resources dependency to 0.2.5
and the spring-asciidoctor-extensions-block-switch to 0.5.0
2020-12-08 11:38:39 +01:00
Juergen Hoeller
1195b3a0b0 Polishing 2020-12-08 10:39:56 +01:00
Sébastien Deleuze
56721669d1 Upgrade to Kotlin 1.4.21
See gh-26132
2020-12-08 08:29:21 +01:00
Sébastien Deleuze
e87e03c539 Refine ConfigurationClassPostProcessor behavior in native images
This commit refines ConfigurationClassPostProcessor behavior in
native images by skipping configuration classes enhancement
instead of raising an error.

See spring-projects-experimental/spring-graalvm-native#248 for
more details.

Closes gh-26236
2020-12-08 00:12:02 +01:00
Rossen Stoyanchev
194cebd730 Upgrade to Reactor 2020.0.2
Closes gh-26176
2020-12-07 22:59:49 +00:00
Rossen Stoyanchev
7418c4b7b7 Fix buffer leak in AbstractServerHttpResponse
See gh-26232
2020-12-07 22:52:08 +00:00
Rossen Stoyanchev
ad42010785 Correlate data buffers to request log messages
HttpMessageWriter implementations now attach the request log prefix
as a hint to created data buffers when the logger associated with
the writer is at DEBUG level.

Closes gh-26230
2020-12-07 22:29:07 +00:00
Juergen Hoeller
10f6a22315 Upgrade to Undertow 2.2.3 and Apache HttpCore Reactive 5.0.3 2020-12-07 22:08:50 +01:00
Juergen Hoeller
c970c318f4 Polishing 2020-12-07 22:08:01 +01:00
Juergen Hoeller
834032df1f Clarify intended advice execution behavior (includes related polishing)
Closes gh-26202
2020-12-07 22:06:22 +01:00
Brian Clozel
5efa4ad442 Pull images with registry-image resource in build 2020-12-07 20:38:07 +01:00
Rossen Stoyanchev
7ef3257b03 Correctly determine HttpServletMapping for INCLUDE
Closes gh-26216
2020-12-07 17:44:22 +00: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
Sébastien Deleuze
994ec708fc Upgrade to Kotlin Coroutines 1.4.2
Closes gh-26226
2020-12-07 10:49:12 +01:00
Stephane Nicoll
da15fe4c94 Upgrade to Gradle 6.7.1
Closes gh-26225
2020-12-07 10:43:22 +01:00
mplain
a1d134b086 Add missing Kotlin extensions for WebClient.ResponseSpec
Closes gh-26030
2020-12-07 10:34:39 +01:00
Juergen Hoeller
3c85c263d2 Upgrade to Groovy 3.0.7, RxJava 3.0.8, Mockito 3.6.28 2020-12-04 23:29:21 +01:00
Sam Brannen
7b3f53de50 Polish SpelParserTests 2020-12-04 18:49:05 +01:00
VonUniGE
ec7425c1f4 Fix typo in javadoc for ResponseExtractor 2020-12-04 16:18:59 +00:00
limo520
ef05eb3729 Fix assertions in SpelParserTests.generalExpressions
Closes gh-26211

Co-authored-by: fengyuanwei <fengyuanwei@wondersgroup.com>
2020-12-04 13:59:16 +01:00
Rossen Stoyanchev
8ac39a50fe ServletServerHttpResponse reflects Content-Type override
Closes gh-25490
2020-12-03 18:41:18 +00:00
Rossen Stoyanchev
d82cb15439 Ensure both mock files and parts can be provided
Closes gh-26166
2020-12-03 17:53:26 +00:00
Rossen Stoyanchev
8c1d06e0c4 Polishing contribution
Closes gh-25927
2020-12-03 17:16:27 +00:00
shevtsiv
01892c6524 Optimization in ResourceArrayPropertyEditor
The previous implementation uses ArrayList for storing resolved
resources and ArrayList has O(n) time complexity for the contains
operation. By switching to the HashSet for storing resolved
resources we improve the time complexity of this operation to be O(1).

See gh-25927
2020-12-03 17:16:27 +00:00
Brian Clozel
9776929a9d Mention security considerations in Forwarded filters
This commit improves the Javadoc for the `ForwardedHeaderFilter`
(Servlet Filter) and `ForwardedHeaderTransformer` (reactive variant) so
as to mention security considerations linked to Forwarded HTTP headers.

Closes gh-26081
2020-12-03 15:40:31 +01:00
Brian Clozel
4337d8465c Remove spring.event.invoke-listener startup event
Prior to this commit, the `SimpleApplicationEventMulticaster` would be
instrumented with the `ApplicationStartup` and start/stop events for
invoking event listeners (`spring.event.invoke-listener`).

This feature was already limited to single-threaded event publishers,
but is still flawed since several types of events can happen
concurrently. Due to the single-threaded nature of the startup sequence,
our implementation should not produce startup events concurrently.

This can cause issues like gh-26057, where concurrent events lead to
inconcistencies when tracking parent/child relationships.

This commit removes the `spring.event.invoke-listener` startup event as
a result.

Fixes gh-26057
2020-12-03 15:40:31 +01:00
Arjen Poutsma
8f0ad73bfd Merge pull request #26133 from alexfeigin/master
* gh-26133:
  Expose future response in new AsyncServerResponse
2020-12-03 14:51:49 +01:00
Alex Feigin
3714d0e401 Expose future response in new AsyncServerResponse
This commit introduces AsyncServerResponse, an extension of
ServerResponse that is returned from ServerResponse.async and that
allows users to get the future response by calling the block method.
This is particularly useful for testing purposes.
2020-12-03 14:45:56 +01:00
Juergen Hoeller
227d85a6b4 Upgrade to Jackson 2.12, Hibernate ORM 5.4.25, Checkstyle 8.38
See gh-25907
2020-12-02 17:22:22 +01:00
Arjen Poutsma
a1320cd450 Add SSE support to WebMvc.fn
This commit adds support for sending Server-Sent Events in WebMvc.fn,
through the ServerResponse.sse method that takes a SseBuilder DSL.
It also includes reference documentation.

Closes gh-25920
2020-12-02 15:14:47 +01:00
Johnny Lim
c7f2f50c15 Polish ConfigurationClassPostProcessorTests
Closes gh-26197
2020-12-02 15:07:15 +01:00
Juergen Hoeller
396fb0cd51 Support for multi-threaded addConverter calls
Closes gh-26183
2020-12-02 12:25:37 +01:00
Rossen Stoyanchev
5328184f3a ContentCachingResponseWrapper skips contentLength for chunked responses
Closes gh-26182
2020-12-01 17:46:12 +00:00
Rossen Stoyanchev
1e19e51c9c Fix exchangeToMono sample in reference
Closes gh-26189
2020-12-01 17:46:12 +00:00