Commit Graph

2208 Commits

Author SHA1 Message Date
Rossen Stoyanchev
c6a655275d Allow overriding of FormHttpMessageWriter#getMediaType
Closes gh-22588
2019-03-20 14:46:38 -04:00
Sam Brannen
7d498ba681 Fix Checkstyle error and polish Javadoc for ResourceHttpMessageReader 2019-03-20 11:03:54 +01:00
Rossen Stoyanchev
4a397f108a ResourceDecoder supports filename hint
Closes gh-22267
2019-03-19 17:50:06 -04:00
Rossen Stoyanchev
5a3ff35215 Map arg resolver backs out if annotations present
Closes gh-21874
2019-03-19 16:41:26 -04:00
Arjen Poutsma
228cae216e Merge branch '5.1.x' 2019-03-19 11:30:43 +01:00
Arjen Poutsma
4651039b1f Use ChannelListener for Undertow zero-copy file transfers
This commit changes the UndertowServerHttpResponse to use a
listener-based approach instead of a blocking approach.

Closes gh-22413
2019-03-19 11:16:42 +01:00
Rossen Stoyanchev
e6d206b45a Extra information in WebFlux stacktraces
Use the checkpoint operator at various places in WebFlux to insert
information that Reactor then uses to enrich exceptions, via suppressed
exceptions, when error signals flow through the operator.

Closes gh-22105
2019-03-15 16:25:43 -04:00
Sam Brannen
9d2e7ced89 Favor Math.[min|max]() over handcrafted code
In line with the general trend toward favoring core JDK APIs for common
tasks in Spring Framework 5.2, this commit replaces handcrafted
statements with Math.min() and Math.max() were applicable.
2019-03-14 16:48:44 +01:00
Juergen Hoeller
840d80b994 Merge branch '5.1.x' 2019-03-13 16:24:01 +01:00
Juergen Hoeller
fe56aa6fa4 Polishing 2019-03-13 15:32:24 +01:00
Rossen Stoyanchev
57a67a3c06 Header predicate option in AbstractRequestLoggingFilter
Closes gh-22244
2019-03-12 17:05:40 -04:00
Rossen Stoyanchev
2b4cd5cf56 Fragment should be expanded last
Closes gh-22447
2019-03-12 15:10:35 -04:00
Juergen Hoeller
a06ab6d0ad Polishing 2019-03-08 09:54:44 +01:00
Lars Grefer
a98e3f0481 Migrate CacheControl to use java.time.Duration for durations 2019-03-08 09:12:19 +01:00
Juergen Hoeller
17930d6c27 Consistent formatting and related polishing 2019-03-07 17:25:48 +01:00
stsypanov
cb4d6f097c Use StringJoiner where possible to simplify String joining 2019-03-07 16:51:18 +01:00
Juergen Hoeller
18f2e6a12d AnnotationConfigRegistry exposes registerBean with supplier/qualifiers
Closes gh-22457
2019-03-05 18:26:04 +01:00
www
ef91313342 Use String::isEmpty instead of "".equals(arg) when arg is not null 2019-03-05 14:32:56 +01:00
Juergen Hoeller
b2b0df893a Merge branch '5.1.x' 2019-03-05 14:20:02 +01:00
Juergen Hoeller
d034c053b3 Jackson2Tokenizer passes DeserializationContext into all TokenBuffers
See gh-22510
2019-03-05 13:47:26 +01:00
Juergen Hoeller
013c0bca92 Polishing 2019-03-05 13:08:11 +01:00
Juergen Hoeller
f6693e790a Jackson2Tokenizer passes DeserializationContext into TokenBuffer
Closes gh-22510
2019-03-05 13:08:04 +01:00
Sam Brannen
a9f251db42 Fix broken Javadoc links 2019-03-03 17:18:18 +01:00
Sam Brannen
abda6a6c66 Polishing 2019-03-02 16:17:58 +01:00
Sam Brannen
02be21d0dc Polishing 2019-03-02 14:22:28 +01:00
Johnny Lim
e21d94f91b Polish
Closes gh-22472
2019-02-26 08:57:03 +01:00
Juergen Hoeller
bc0317af3b Merge branch '5.1.x' 2019-02-25 17:57:49 +01:00
Juergen Hoeller
9eb7f7e294 Polishing 2019-02-25 17:36:37 +01:00
Johnny Lim
625e210676 Polish 2019-02-25 12:17:53 +01:00
Sebastien Deleuze
dc8fb8bc5e Use StringJoiner where possible to simplify String joining 2019-02-25 12:11:57 +01:00
Brian Clozel
afbe7b31bb Polish
See gh-22341
2019-02-11 10:46:27 +01:00
Brian Clozel
fb4a28f904 Polish
See gh-22340
2019-02-11 10:45:50 +01:00
Brian Clozel
1bf3b36ce8 Polish
See gh-22340
2019-02-05 15:06:33 +01:00
Brian Clozel
ba8849dda3 Avoid MimeType garbage creation
Prior to this commit, calls to `MimeType` and `MediaType` would create a
significant amount of garbage:

* during startup time, in the static sections of `MimeType` and
`MediaType` when creating well-known types
* at runtime, when parsing media types for content negotiation or
writing known media types as strings in HTTP response headers

This commit does the following:

* Avoid parsing the well-known types and use regular constructors
instead
* Cache types in a simple LRU cache once they've been parsed, since an
application is likely to deal with a limited set of types
* Avoid using `java.util.stream.Stream` in hot code paths

Benchmarks show that a complete revision of the `MimeTypeUtils` parser
is not required, since the LRU cache is enough there.

Closes gh-22340
2019-02-05 14:33:43 +01:00
Rossen Stoyanchev
b8f7c37cc4 Merge branch '5.1.x' 2019-01-25 17:01:51 -05:00
Rossen Stoyanchev
4560dc2818 Improve empty body check
Fixes gh-22265
2019-01-25 15:48:04 -05:00
Juergen Hoeller
05f1ea8515 Merge branch '5.1.x' 2019-01-25 15:46:01 +01:00
Juergen Hoeller
85ec9b9df2 Avoid Class.getPackage() in favor of plain Class.getName() checks
Fixes #22306
2019-01-25 15:35:49 +01:00
Juergen Hoeller
160ecdf956 Merge branch '5.1.x' 2019-01-24 15:35:28 +01:00
Juergen Hoeller
7cc700435b HandlerMethod skips interface parameter introspection for return value
Fixes #22303
2019-01-24 15:18:55 +01:00
Arjen Poutsma
a5cef3845c Improve message for HttpStatusCodeException with empty status text
This commit improves the message for HttpStatusCodeException so that it
defaults to the HttpStatus reason phrase if a status text is not
provided.

This commit also fixes SimpleClientHttpResponse so that it does not
return null for getStatusText().

Fixed #22162
2019-01-23 11:44:00 +01:00
Rossen Stoyanchev
e373b46660 Jackson2JsonDecoder tolerates null literal
Fixes #22042
2019-01-18 18:27:40 -05:00
Rossen Stoyanchev
5dcde9e7d7 Trim decoded SSE data
Fixes #22043
2019-01-18 18:13:58 -05:00
Rossen Stoyanchev
a77eee899a Document synchronous use of the WebClient
Fixes #22173
2019-01-18 17:46:16 -05:00
Juergen Hoeller
72dddfbc7b Polishing 2019-01-09 12:26:58 +01:00
Rossen Stoyanchev
dc3f953f4b Correction for commit #b219c6c
Issue: SPR-17630
2019-01-08 22:43:42 -05:00
Juergen Hoeller
a82f049083 FormHttpMessageConverter officially supports non-String form values
Issue: SPR-17645
2019-01-08 17:11:07 +01:00
Rossen Stoyanchev
b219c6ce15 Adjust UriComponentsBuilder#toUriString behavior
Commit #93b7a4 added support for pre-configuring URI variables at the
UriComponentsBuilder level, and also changed toUriString to encode
template and URI variables separately. However this went a bit too far
causing side effects for URLs with curly braces that don't represent
URI variables.

This commit restores the original toUriString behavior which is to
encode template and URI variables sepraately only if URI variables have
been pre-configured.

Issue: SPR-17630
2019-01-08 11:06:33 -05:00
王诗峣
b94e8c4bef Fix ClassCastException in FormHttpMessageConverter
We should not cast MultiValueMap<String, ?> to MultiValueMap<String, String>
2019-01-08 12:19:51 +01:00
Juergen Hoeller
6e3f974951 HttpHeaders.writableHttpHeaders properly handles HttpHeaders.EMPTY
Issue: SPR-17633
2019-01-08 00:32:27 +01:00