Commit Graph

507 Commits

Author SHA1 Message Date
igor-suhorukov 7bce04c06c Polish: combine catches block with same body 2018-02-27 12:51:28 +01:00
igor-suhorukov 49fd724d8f Polish: String function use should be optimized for single characters 2018-02-25 20:48:47 +01:00
Rossen Stoyanchev 9c55dd5961 Additional shortcut with charset in WebSocketMessage 2018-02-25 14:41:13 -05:00
Juergen Hoeller 0ef9568c06 Upgrade to OkHttp 3.10 (as well as RxJava 2.1.10 and Caffeine 2.6.2) 2018-02-25 15:38:56 +01:00
Juergen Hoeller 3531c104b0 Prefer Collections.addAll call with array over Set.addAll(Arrays.asList) 2018-02-25 00:21:39 +01:00
Juergen Hoeller a5cbf5fe24 Consistent use of Collection.toArray with zero-sized array argument
Includes consistent use of ClassUtils.toClassArray (as non-null variant)

Issue: SPR-16523
2018-02-22 11:29:46 +01:00
Juergen Hoeller 0de36d2883 Consistent HttpMethod identity comparisons 2018-02-18 22:01:22 +01:00
Juergen Hoeller d7cab23e6d Consistent use of StringUtils.toStringArray
(cherry picked from commit 6d11b40)
2018-02-16 20:49:17 +01:00
Juergen Hoeller 8d3264f680 Prefer List.sort(Comparator) over Collections.sort(List, Comparator) 2018-02-16 10:23:18 +01:00
Andy Wilkinson 52dfc4ebc4 Align spring-webflux's Webjars Locator dependency with spring-webmvc 2018-02-15 00:58:17 +01:00
igor-suhorukov 7826567df6 Polish: lamdbas containing only one statement should not nest this statement in a block 2018-02-14 01:22:01 +01:00
Juergen Hoeller 99662bc702 Polishing 2018-02-13 23:32:10 +01:00
igor-suhorukov 45e520ed86 Polish: remove unused private fields, remove empty operator 2018-02-13 23:00:18 +01:00
Rossen Stoyanchev 1908080d5c Test for disconnected client detection
Issue: SPR-16494
2018-02-13 14:58:10 -05:00
Rossen Stoyanchev 73095955bf Refine logging in ExchangeFunctions
Notably do not log error signal since we are letting that propagate.

Also improve logging messages vs relying on the log operator.

Issue: SPR-16484
2018-02-12 15:56:04 -05:00
igor-suhorukov 0ee505b73e Polish: assertion arguments should be passed in the correct order,
use assertNull instead of assertEquals(null, value),
declare delta as double value in assertEquals
2018-02-10 17:17:28 +01:00
igor-suhorukov 6ea0af3540 Polish: Lambdas should be replaced with method references 2018-02-10 12:09:46 +01:00
Stephane Nicoll 991eb4858e Update copyright header 2018-02-09 10:16:58 +01:00
igor-suhorukov e381514b07 Collection.isEmpty() should be used to test for emptiness
Closes gh-1670
2018-02-09 10:11:44 +01:00
igor-suhorukov 4c888d0f32 Polish
Closes gh-1669
2018-02-09 10:10:05 +01:00
Rossen Stoyanchev 1653a32a04 Stabilize Flux.interval emissions in integration tests
After this commit the use of interval in tests is combined with
take(n).onBackpressureBuffer(n) to ensure emissions don't fail if the
fixed rate is exceeded (e.g. on slow CI server).

Tests that verify N number of items followed by verifyOnComplete()
should set the number of emissions to N.

Tests that verify N number of items followed by thenCancel() should
set the number of buffered to an arbitrary number greater than N.
2018-02-06 11:01:19 -05:00
Arjen Poutsma 609f173ebc StringDecoder shouldn't chop off strings randomly
Issue: SPR-16337
2018-02-02 15:59:21 +01:00
Juergen Hoeller c5a33d62dd TypeVariablesVariableResolver compares variables by full equality again
Issue: SPR-16456
2018-02-02 12:41:43 +01:00
Juergen Hoeller 7f96827ade Polishing 2018-02-02 11:34:03 +01:00
sdeleuze b6c78452b2 Update and improve script templating documentation
Issue: SPR-16447
2018-01-31 17:57:41 +01:00
sdeleuze b2681e1f4a Add ViewResolverRegistry#scriptTemplate in WebFlux
Issue: SPR-16431
2018-01-31 10:38:08 +01:00
sdeleuze d02e4fb545 Add Vary:Access-Control-Request-Method/Headers CORS headers
This commit adds these 2 Vary headers in addition to the existing
Origin one to avoid caching of Access-Control-Request-Method and
Access-Control-Request-Headers headers which can be an issue
when allowed methods or headers are unbounded and only the
requested method or headers are returned in the response.

Issue: SPR-16413
2018-01-30 17:00:32 +01:00
sdeleuze 32f6ccece8 Add WebFlux support for Smile streaming
The commit brings following changes:
 - Move getDecodableMimeTypes() to AbstractJackson2Decoder
 - Move getEncodableMimeTypes() to AbstractJackson2Encoder
 - Add support for application/stream+x-jackson-smile
 - Avoid streaming line separator when Smile encoder is used
 - Use double null token in Jackson2Tokenizer to identify documents

Issue: SPR-16151
2018-01-29 18:56:25 +01:00
Rossen Stoyanchev 00b95b10a8 Docs: result handling and view resolution
Issue: SPR-16393
2018-01-26 22:14:14 -05:00
Rossen Stoyanchev fbde97f302 Default order 0 for ServerResponseResultHandler
Issue: SPR-16420
2018-01-26 17:06:01 -05:00
Juergen Hoeller 91e6274b7d Upgrade to Apache HttpClient 4.5.5 and Tomcat 8.5.27 2018-01-22 22:11:00 +01:00
Juergen Hoeller 61579ffe7b Polishing 2018-01-22 21:34:44 +01:00
Juergen Hoeller 9d0e62ef68 Javadoc format and related polishing 2018-01-22 11:43:21 +01:00
Arjen Poutsma 0befc60c8f Renamed DataBufferUtils/DataBufferFactory.compose to join
Issue: SPR-16365
2018-01-22 10:51:07 +01:00
Arjen Poutsma c53c8bfc5a Set 304 status on ServerResponse when ETag/LastModified match
This commit checks the Etag/LastModified headers on the incoming
request, and sets a 304 Not Modified status with no body when they
match, by delegating to ServerWebExchange.checkNotModified.

Issue: SPR-16348
2018-01-18 11:34:38 +01:00
Arjen Poutsma c211e3998b Polishing 2018-01-18 11:34:38 +01:00
Arjen Poutsma 61d330f805 Javadoc 2018-01-18 11:34:38 +01:00
Juergen Hoeller ea5f8f5a7c Consistently handle NoClassDefFoundError in BeanUtils and related places
Issue: SPR-16369
2018-01-17 20:24:57 +01:00
Juergen Hoeller 9623cdec48 Functional response builders allow for non-standard HTTP status codes
Issue: SPR-16366
2018-01-14 17:45:58 +01:00
Juergen Hoeller 4c9ed0d87e Polishing 2018-01-12 18:24:00 +01:00
Arjen Poutsma 67e7c784e8 Use DataBufferUtils.compose and remove writeAggregator
Use DataBufferUtils.compose instead of writeAggregator to combine
multiple data buffers into one, as the write aggregator would not work
when the initial data buffer did not have enough capacity to contain
all subsequent buffers.

Removed writeAggregator, as it is no longer needed.

Issue: SPR-16365
2018-01-12 10:36:09 +01:00
Rossen Stoyanchev 84b8ceca0f Update Javadoc for AbstractHandlerMapping properties
Clarify what PathPatternParser is used for which is CORS checks in the
very least. Some sub-classes will also use it for request mapping but
not all (e.g. RouterFunctionMapping). Hence the need to be more
explicit.
2018-01-11 12:41:04 -05:00
Rossen Stoyanchev 72e3c43375 Refine @EnableWebFlux docs for functional endpoints
@EnableWebFlux bootstraps both annotated controllers and functional
endpoints, so we need to be more explicit about which parts of the
configuration apply to which.

Issue: SPR-16360
2018-01-11 12:25:42 -05:00
Arjen Poutsma f7bf6460aa Reverted signature change on fromMultipartData
Reverted back from `MultiValueMap<String, Object>` to
`MultiValueMap<String, ?>`
2018-01-10 17:54:51 +01:00
Rossen Stoyanchev b36af8a11f Uncomment test after Reactor Netty fix
Issue: SPR-16246
2018-01-10 10:47:36 -05:00
Arjen Poutsma 8a129ef3da Use write aggregator from DataBufferUtils
This commit uses the newly introduced write aggregator from
DataBufferUtils throughout WebFlux.

Issue: SPR-16351
2018-01-10 11:15:47 +01:00
Rossen Stoyanchev 30c0616384 Improve error message
Issue: SPR-16214
2018-01-08 21:30:41 -05:00
Rossen Stoyanchev 446e7ed25c Links from @RequestMapping to reference docs
Issue: SPR-16266
2018-01-08 09:29:52 -05:00
Rossen Stoyanchev 93a522f336 Fix regression in BodyInserters with multipart data
The issue was introduced very recently with commit #7035ee but never
released.

Issue: SPR-16350
2018-01-05 13:59:14 -05:00
sdeleuze deac8e556e Improve Kotlin extensions doc about type erasure
Since type erasure can be fixed only when using
ParameterizedTypeReference based Java methods, RestOperations and
WebFlux API documentation should be updated to specify which extensions
are subject to type erasure, and which are not.

Issue: SPR-16273
2017-12-27 17:49:18 +01:00