Commit Graph

860 Commits

Author SHA1 Message Date
Juergen Hoeller
1c0a4f8d78 Polishing 2020-02-24 19:34:15 +01:00
Juergen Hoeller
170adccf80 Upgrade to RxJava 2.2.17, OkHttp 3.14.6, Hibernate ORM 5.3.15 2020-01-13 10:58:51 +01:00
Brian Clozel
98390e1e5e Copy strategiesConfigurers when cloning WebClient.Builder
This commit fixes the missing `strategiesConfigurers` copy when the
`WebClient.Builder` is cloned.

Fixes gh-24330
See gh-24329
2020-01-10 16:08:04 +01:00
Juergen Hoeller
7f49abb6d1 Upgrade to Netty 4.1.44, Jetty 9.4.25, Undertow 2.0.29, OkHttp 3.14.5 2020-01-09 16:17:33 +01:00
Rossen Stoyanchev
26a2d3875f Expose ClientCodecConfigurer in WebClient.Builder
Using Consumer<ClientCodecConfigurer> instead of
Consumer<ExchangeStrategies> eliminates one level of nesting that is
also unnecessary since codecs are the only strategy at present.

Backport of dd9b6287b4

Closes gh-24201
2019-12-13 06:38:49 +00:00
Rossen Stoyanchev
802d083df7 Add register methods to CodecConfigurer.CustomCodecs
The new register methods replace the now deprecated
encoder, decoder, reader, and writer methods, and also offer a choice
to opt into default properties such maxInMemorySize, if configured.

Backport of 11e321b8e7

See gh-24201
2019-12-13 06:38:43 +00:00
Brian Clozel
83683a13bb Allow ExchangeStrategies customizations in WebClient
Backport of d4209392 and acfeb77d

Closes gh-23961
2019-12-02 17:10:29 +00:00
Brian Clozel
25554d0b21 Revert "Allow ExchangeStrategies customizations in WebClient"
This reverts commit 43e047c523.
2019-12-02 10:29:24 +01:00
Juergen Hoeller
b3237f3eb6 Polishing 2019-12-01 00:41:53 +01:00
Brian Clozel
43e047c523 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-24106
2019-11-29 23:35:20 +01:00
Juergen Hoeller
8b1709b8f3 Upgrade to Hibernate Validator 6.0.18 and Undertow 2.0.28 2019-11-20 17:45:18 +01:00
Juergen Hoeller
088a653318 Upgrade to RxJava 2.2.14, OkHttp 3.14.4, Awaitility 3.1.6 2019-11-07 22:35:30 +01:00
Rossen Stoyanchev
1a057654b2 Defer ExchangeFilterFunction to subscription time
Previously fixed in 5.2 via d46359. Now also backported to 5.1.x.

Closes gh-23909
2019-11-06 21:38:32 +00:00
Rossen Stoyanchev
48b22292ff Fix issue with path matching options
Closes gh-23907
2019-11-06 18:13:10 +00:00
Juergen Hoeller
3616e96792 Upgrade to SLF4J 1.7.28, Groovy 2.5.8, RxJava 2.2.12, Joda-Time 2.10.4, Rome 1.12.2, OkHttp 3.14.3, Apache HttpClient 4.5.10, Apache Johnzon 1.1.13 2019-09-25 22:27:41 +02:00
Rossen Stoyanchev
2794264480 Fix JettyRequestUpgradeStrategy initialization bug
Closes gh-23313
2019-09-24 11:34:46 +01:00
Phillip Webb
d945ae9191 Add blank line between java and javax imports
See gh-23539

Co-authored-by: Sam Brannen <sbrannen@pivotal.io>
2019-09-16 13:41:59 +02:00
Rossen Stoyanchev
f259fda8eb Fix checkstyle violations 2019-09-12 21:46:42 +01:00
Rossen Stoyanchev
6eb0e9e44b Unwrap decorated request or response
Closes: gh-23598
2019-09-12 13:42:12 +01:00
Sam Brannen
d036b5a283 Do not treat void and Void as simple types in BeanUtils
Prior to this commit, the isSimpleProperty() and isSimpleValueType()
methods in BeanUtils treated void and Void as simple types; however,
doing so does not make sense in this context, since void implies the
lack of a property or value.

This commit addresses this by explicitly excluding void and Void in the
logic in isSimpleValueType().

This commit also simplifies the implementation of
ViewResolutionResultHandler.supports(HandlerResult) to take advantage
of this change.

Closes gh-23573
2019-09-04 15:48:40 +02:00
Sam Brannen
f37ec90f2f Consider Void.class a primitive wrapper in ClassUtils
Prior to this commit, ClassUtils.isPrimitiveOrWrapper() and
ClassUtils.isPrimitiveWrapper() did not return true for Void.class.
However, ClassUtils.isPrimitiveOrWrapper() did return true for
void.class. This lacking symmetry is inconsistent and can lead to bugs
in reflective code.

See: https://github.com/spring-projects/spring-data-r2dbc/issues/159

This commit addresses this by adding an entry for Void.class -> void.class
in the internal primitiveWrapperTypeMap in ClassUtils.

Closes gh-23572
2019-09-03 14:02:24 +02:00
Arjen Poutsma
f748b1e68d Fix timing bug in DataBufferUtils::readAsynchronousFileChannel
This commit makes sure that reading is enabled after the current
signal has been processed, not while is is being processed. The bug
was only apparent while using the JettyClientHttpConnector, which
requests new elements continuously, even after the end of the
stream has been signalled.
2019-09-02 15:13:22 +02:00
Arjen Poutsma
d709a69ff1 Remove buffering of encoded parts in MultipartHttpMessageWriter
Closes gh-23518
2019-08-29 16:34:36 +02:00
Rossen Stoyanchev
6d8bf3466c Suppress decoding error for resource path
Closes gh-23463
2019-08-21 10:02:15 +03:00
Juergen Hoeller
438b40f6d7 Consistent ordering of WebClient.Builder methods 2019-07-31 23:48:14 +02:00
Juergen Hoeller
960079e5f5 Retain non-null HttpStatus return value in Client(Http)Response
See gh-23366
2019-07-30 22:26:46 +02:00
Arjen Poutsma
29ef985411 Add support for non-standard status codes
Added support for status codes that do not occur in HttpStatus in
DefaultClientResponseBuilder and made ClientResponse::statusCode
ClientHttpResponse::getStatusCode @Nullable.

Closed gh-23366
2019-07-30 17:44:47 +02:00
Juergen Hoeller
c4622dbebc Polishing 2019-07-30 16:59:01 +02:00
Arjen Poutsma
6cb4b8bd43 Add onRawStatus to WebClient
- Add onRawStatus to WebClient.ResponseSpec, allowing users to deal with
  raw status codes that are not in HttpStatus.
- No longer throw an exception status codes not in HttpStatus.

Closes gh-23367
2019-07-30 15:10:33 +02:00
Stephane Maldini
50a909908c Remove unnecessary flushOnEach (since reactor-netty 0.9) 2019-07-30 10:54:51 +02:00
Rossen Stoyanchev
2aec175ccc Drain body after exception from applying onStatus
Closes gh-23230
2019-07-05 10:50:03 +01:00
Rossen Stoyanchev
29b7659094 Polish 2019-07-02 09:32:07 +01:00
Ilya Lukyanovich
27b5d2b288 Optional @RequestPart Mono arg resolves to Mono.empty
Closes gh-23060
2019-07-02 09:32:07 +01:00
Juergen Hoeller
29dcd19971 Upgrade to AspectJ 1.9.4, RxJava 2.2.10, Jetty 9.4.19, Undertow 2.0.22
Includes Hibernate Validator 6.0.17 and renames "withoutJclOverSlf4j".
2019-06-22 16:49:40 +02:00
Juergen Hoeller
33b5bc2aae Polishing 2019-06-11 23:50:29 +02:00
Juergen Hoeller
22aba8bf60 Upgrade to Apache HttpClient 4.5.9 2019-06-11 23:49:57 +02:00
Juergen Hoeller
7dc92aa05d Polishing 2019-06-11 20:57:27 +02:00
Rossen Stoyanchev
9ce5a18d96 Ignore null attributes in AbstractView
Consistent with ConcurrentModel and also with treatment of empty values
from async attributes.

Closes gh-23038
2019-06-07 16:25:47 -04:00
Juergen Hoeller
5aa0de7ac8 Upgrade to OkHttp 3.14.2, Joda-Time 2.10.2, OpenPDF 1.2.17, JRuby 9.2.7 2019-05-21 20:47:06 +02:00
Rossen Stoyanchev
da4430e27e BindingResult for resolved async attributes
ViewResolutionResultHandler no longer adds BindingResult objects for
async model attributes. Instead AbstractView adds them later when
those attributes are resolved to concrete values.

Closes gh-22933
2019-05-16 20:41:37 -04:00
Rossen Stoyanchev
172afb510a Polish AbstractView in WebFlux 2019-05-16 14:37:04 -04:00
Juergen Hoeller
daee6f5bd9 Avoid expensive assertions in web resource resolution
Closes gh-22955
2019-05-13 13:28:07 +02:00
Juergen Hoeller
d16beb0e55 Polishing
See gh-22900
2019-05-07 01:40:53 +02:00
Juergen Hoeller
c841b62bb0 Consistent parameter retrieval across InvocableHandlerMethod variants
See gh-22900
2019-05-07 01:20:05 +02:00
Juergen Hoeller
3f85a7db1b Consistent exception naming across InvocableHandlerMethod variants
See gh-22900
2019-05-07 00:48:27 +02:00
Juergen Hoeller
ea4a174583 Polishing 2019-05-03 18:10:41 +02:00
Juergen Hoeller
3d6476da46 Polishing 2019-05-03 17:29:22 +02:00
Juergen Hoeller
a7949ac84a Consistent use of StringUtils.hasLength(String) vs isEmpty(Object) 2019-05-03 17:29:14 +02:00
Juergen Hoeller
84266d71e9 Polishing 2019-05-03 14:08:20 +02:00
Juergen Hoeller
31c3b8a291 Avoid unguarded String concatenation for debug/trace logging
Closes gh-22874
2019-05-03 00:10:56 +02:00