Commit Graph

1940 Commits

Author SHA1 Message Date
Sebastien Deleuze c006a83584 Upgrade to Coroutines 1.3.0-RC
This commit upgrades Coroutines support to kotlinx.coroutines
1.3.0-RC, leverages the new Coroutines BOM and refine Coroutines
detection to avoid false positives.

Only Coroutines to Mono context interoperability is supported
for now.

CLoses gh-23326
2019-07-21 11:27:43 +02:00
Juergen Hoeller 45136aabd4 Upgrade to Protobuf 3.9 (plus consistent XMLUnit declarations) 2019-07-20 19:06:54 +02:00
Juergen Hoeller 8ea3aa512f Merge branch '5.1.x' 2019-07-20 16:35:05 +02:00
Juergen Hoeller 209c8505e6 Align forRawClassAssignableFromTypeVariable with 5.1 assertion style
See gh-23321
2019-07-20 16:10:49 +02:00
Juergen Hoeller 69d3e89814 Polishing 2019-07-20 15:05:49 +02:00
Phillip Webb be65bef91b Merge branch '5.1.x' 2019-07-20 13:23:37 +01:00
Phillip Webb e5bef10d85 Fix ResolvableType raw class isAssignable checks
Fix `isAssignable` for `ResolvableType.forRawClass` so that it can be
used with types backed by a `TypeVarible`. Prior to this commit the
rawClass value was used, which wouldn't always work.

Closes gh-23321
2019-07-20 13:23:21 +01:00
Arjen Poutsma 090bfa63a1 Add DataBuffer::toString(Charset)
Closes gh-23317
2019-07-19 12:45:24 +02:00
Arjen Poutsma c8704ce473 Introduce DataBufferWrapper
This commit introduces the DataBufferWrapper, a wrapper for DataBuffers,
and uses it in applicable use cases.
2019-07-19 12:45:24 +02:00
Sebastien Deleuze 095fd5bcb3 Use Kotlin BOM
Close gh-23316
2019-07-19 10:43:54 +02:00
Juergen Hoeller 7f33344784 Tracking ASM master
See gh-23156
2019-07-17 22:34:39 +02:00
Juergen Hoeller 94e3210ae7 Fix nullability warnings and javadoc-triggered package cycles 2019-07-17 22:34:07 +02:00
Sam Brannen 7779aa3487 Polish contribution
See gh-23297
2019-07-17 16:53:47 +02:00
Scheidter,Ryan 84200f3141 Treat null path as non-matching pattern in AntPathMatcher
Prior to this commit, a null path supplied to the isPattern(), match(),
and matchStart() methods in AntPathMatcher resulted in a
NullPointerException.

This commit addresses this by treating a `null` path as a non-matching
pattern.

Closes gh-23297
2019-07-17 16:53:47 +02:00
Sam Brannen 699d3f15e8 Simplify LocalVariableTableParameterNameDiscoverer implementation
This commit refactors the internals of
LocalVariableTableParameterNameDiscoverer to use
java.lang.reflect.Executable in order to simplify the implementation.
2019-07-12 12:02:49 +02:00
mfeng-ya 309b328719 Use computeIfAbsent in LocalVariableTableParameterNameDiscoverer
Closes gh-23281
2019-07-12 11:44:10 +02:00
Arjen Poutsma 09572e7b60 Removed DataBufferUtils::split
DataBuffers::split (and underlying algorithm) should not be returning
a Flux<DataBuffer>, but rather a Flux<Flux<DataBuffer>>. In other words,
it should not join all data buffers that come before a delimiter.

Providing an implementation of a such a fully reactive split method
proved to be beyond the scope of this release, so this commit removes
the method altogether.
2019-07-10 16:00:11 +02:00
Arjen Poutsma fdcf09dc2f Copied buffering split from DataBufferUtils to StringDecoder
Due to the imminent removal of DataBufferUtils.split, this commit copies
over the buffering split algortihm from DataBufferUtils, as it is still
sutable for the StringDecoder
2019-07-10 16:00:11 +02:00
Arjen Poutsma ef19a6bf8e Various DataBufferUtils improvements
- Made sure that takeUntilByteCount is usable in multiple subscriptions.
- Added composite Matcher
2019-07-10 16:00:11 +02:00
Sebastien Deleuze ca75c2843a Upgrade to Coroutines 1.3.0-M2 2019-07-09 11:36:26 +02:00
Rossen Stoyanchev c199cb9054 @ConnectMapping for RSocket handling
The new annotation helps to differentiate the handling of connection
level frames (SETUP and METADATA_PUSH) from the 4 stream requests.

Closes gh-23177
2019-07-08 17:04:23 +01:00
Sam Brannen fae75cb238 Polish contribution
See gh-23237
2019-07-07 16:29:03 +02:00
Сергей Цыпанов 9f81ffa5ae Use StringJoiner where possible to simplify String joining
Closes gh-23237
2019-07-07 16:19:01 +02:00
Sam Brannen 8f5b2b2231 Merge branch '5.1.x' 2019-07-07 14:49:34 +02:00
Sam Brannen efab6eb55d Ignore empty entries when parsing MediaTypes and MimeTypes
Prior to Spring Framework 5.1.3, MimeTypeUtils.parseMimeTypes() and
MediaType.parseMediaTypes() ignored empty entries, but 5.1.3 introduced
a regression in that an empty entry -- for example, due to a trailing
comma in the list of media types in an HTTP Accept header -- would result
in a "406 Not Acceptable" response status.

This commit fixes this by filtering out empty entries before parsing
them into MimeType and MediaType instances. Empty entries are therefore
effectively ignored.

Fixes gh-23241
2019-07-07 12:39:46 +02:00
Juergen Hoeller d903b9acf5 Compatibility with RxJava 3.0
Closes gh-23208
2019-07-05 16:25:52 +02:00
Juergen Hoeller 6990504d17 Upgrade to ASM 7.2
Closes gh-23156
2019-07-05 16:24:45 +02:00
Rossen Stoyanchev 0d3e5db3ff Compare suffix patterns by length
Closes gh-23125
2019-07-05 07:36:35 +01:00
Phillip Webb b3d56ebf3b Restore StringUtils.hasLength check
Update `MimeTypeUtils` so that the  StringUtils.hasLength check is
performed immediately on the incoming argument, rather than in
`parseMimeTypeInternal`. This restores the `IllegalArgumentException`
rather than the `NullPointerException` which is thrown by the
`ConcurrentHashMap`.

Closes gh-23215
See gh-23211
2019-06-29 22:31:11 -07:00
Brian Clozel 5a308ad5bd Polish MimeTypeUtils LRU cache
This commit improves the cache implementation by skipping the ordering
of most recently used cached keys when the cache is at least half empty.

See gh-23211
2019-06-29 00:17:40 +02:00
Brian Clozel 1b93ea97ac Fix concurrent reads issue in MimeTypeUtils cache
As of gh-22340, `MimeTypeUtils` has a built-in LRU cache implementation
for caching parsed MIME types and avoiding excessive garbage creation at
runtime.
This implementation, when hit with highly concurrent reads on the same
media type (the cache key), can create multiple keys for the same MIME
type string. This duplication leads to the cache filling up and evicting
entries. When the cache fetches a duplicate key, it is then not
associated with a value and the cache can return a `null` value, which
is forbidden by the API contract.

This commit adds another cache check within the write lock: this avoids
creating duplicate entries in the cache and `null` return values.

Fixes gh-23211
2019-06-28 23:43:38 +02:00
Sam Brannen 33fa55e658 Update OrderComparatorTests based on clarified PriorityOrdered semantics
See gh-23187
2019-06-25 11:04:19 +03:00
Sam Brannen b2dc4debde Merge branch '5.1.x' 2019-06-25 10:42:14 +03:00
Sam Brannen dda4dfb44b Clarify semantics of the PriorityOrdered interface
This commit clarifies the semantics of the PriorityOrdered interface
with respect to sorting sets of objects containing both PriorityOrdered
and plain Ordered objects.

Closes gh-23187
2019-06-25 10:40:55 +03:00
Johnny Lim 1afc2be5aa Remove duplicate assertion in AnnotatedElementUtilsTests
Closes gh-23191
2019-06-25 10:00:12 +03:00
Sam Brannen 6cc6abd405 Test status quo for OrderComparator's PriorityOrdered support
See gh-23187
2019-06-24 14:13:46 +03:00
Sam Brannen 4357749a63 Document that OrderComparator honors PriorityOrdered
Prior to this commit, it was not clear that OrderComparator sorts
PriorityOrdered objects with higher priority than plain Ordered objects.
2019-06-24 13:32:54 +03:00
Sam Brannen e3b3481c19 Fix typo in Javadoc 2019-06-24 12:32:41 +03:00
Sam Brannen 4000b244ff Forbid null converters in RestTemplate & HttpMessageConverterExtractor
Prior to this commit, RestTemplate and HttpMessageConverterExtractor did
not validate that the supplied HttpMessageConverter list contained no
null elements, which can lead to a NullPointerException when the
converters are accessed.

This commit improves the user experience by failing immediately if the
supplied HttpMessageConverter list contains a null element. This applies
to constructors for RestTemplate and HttpMessageConverterExtractor as
well as to RestTemplate#setMessageConverters().

Note, however, that RestTemplate#getMessageConverters() returns a mutable
list. Thus, if a user modifies that list so that it contains null values,
that will still lead to a NullPointerException when the converters are
accessed.

This commit also introduces noNullElements() variants for collections in
org.springframework.util.Assert.

Closes gh-23151
2019-06-18 16:13:20 +03:00
Sam Brannen f6a4595cef Polishing 2019-06-17 17:06:37 +03:00
Arjen Poutsma f08656c6cb Add methods to read/write from Path to DataBufferUtils
This commit adds two methods to DataBufferUtils:
- one that reads a Flux<DataBuffer> from a Path
- one that writes a Flux<DataBuffer> to a Path
2019-06-14 14:13:18 +02:00
Juergen Hoeller 0a77477d32 Merge branch '5.1.x' 2019-06-12 18:16:30 +02:00
Juergen Hoeller fc46abf0b7 Polishing 2019-06-12 18:04:06 +02:00
Juergen Hoeller 1ccd99ebe7 Polishing 2019-06-12 14:11:39 +02:00
Juergen Hoeller 918ffacdf8 Polishing 2019-06-12 13:29:35 +02:00
Sam Brannen bee4fb0615 Polishing 2019-06-12 14:07:04 +03:00
Sam Brannen 049437e111 Log exception when closing InputStream in AbstractResource
Prior to this commit, exceptions thrown while closing an InputStream in
AbstractResource were silently ignored.

This commit improves diagnostics for such failure scenarios by logging
the exception at DEBUG level.

Closes gh-23116
2019-06-12 14:07:04 +03:00
Juergen Hoeller 33b5bc2aae Polishing 2019-06-11 23:50:29 +02:00
Juergen Hoeller a89bfffd8c Merge branch '5.1.x' 2019-06-11 23:16:03 +02:00
Phillip Webb 6ac68391c1 Polishing 2019-06-11 12:03:05 -07:00