Commit Graph

1691 Commits

Author SHA1 Message Date
Juergen Hoeller ac4c37d8e2 Merge branch '5.1.x' 2019-03-07 18:05:46 +01:00
Juergen Hoeller 6c87ef09c1 Polishing 2019-03-07 17:55:32 +01:00
stsypanov cb4d6f097c Use StringJoiner where possible to simplify String joining 2019-03-07 16:51:18 +01:00
Sam Brannen f087fd5a93 Report offending class in SpringFactoriesLoader in exception message
Prior to this commit, the exception message generated by
instantiateFactory() in SpringFactoriesLoader did not report the
offending class in the top-level exception message. The offending class
was in fact included in the message of the nested exception, but the
top-level exception message on its own was a bit misleading.

This commit improves the diagnostics for such failures by including the
offending class and the target factory type in the top-level exception
message.

Closes gh-22453
2019-03-06 16:44:41 +01:00
Konrad Kamiński 9302cb2f85 Support Kotlin suspending functions in MethodParameter
Before this commit, the return type for Kotlin suspending functions
(as returned by MethodParameter#getParameterType and
MethodParameter#getGenericReturnType methods) was incorrect.

This change leverages Kotlin reflection instead of Java one
to return the correct type.

Closes gh-21058
2019-03-06 10:14:34 +01:00
Rossen Stoyanchev 9e7f557b4a Updates for buffer management in RSocket
- Integration tests run with zero copy configuration.
- RSocketBufferLeakTests has been added.
- Updates in MessagingRSocket to ensure proper release

See gh-21987
2019-03-04 23:35:43 -05:00
Sam Brannen 70cf597484 Remove obsolete overview.html files 2019-03-04 14:07:48 +01:00
Brian Clozel 3ac1dddb9d Merge branch '5.1.x' 2019-03-04 13:58:41 +01:00
Andrew Tulloch 090aceb3ad Fix repeated calls to DataBuffer.write(CharSequence, Charset)
Prior to this commit, repeated calls to `DataBuffer.write(CharSequence,
Charset)` would not write the given chars to the expected position in
the original buffer.

This commit fixes that by writing to the `outBuffer.position()`, offset
by the current `DataBuffer.writePosition()`.

Fixes gh-22484
2019-03-04 13:37:06 +01:00
Juergen Hoeller a7db395d9b Merge branch '5.1.x' 2019-02-28 19:29:04 +01:00
Juergen Hoeller 5d8a34fee6 Only prefer JDK 9+ Lookup.defineClass API if ClassLoader matches
Closes gh-22416
2019-02-28 19:28:03 +01:00
Juergen Hoeller fc7948c96b Merge branch '5.1.x' 2019-02-27 17:34:46 +01:00
Juergen Hoeller e583da0725 Polishing 2019-02-27 17:26:53 +01:00
Sam Brannen 40da78e9df Polishing 2019-02-27 16:30:05 +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
Sebastien Deleuze dc8fb8bc5e Use StringJoiner where possible to simplify String joining 2019-02-25 12:11:57 +01:00
Juergen Hoeller 6db75956b9 Merge branch '5.1.x' 2019-02-15 17:16:28 +01:00
Juergen Hoeller e307dd58db Polishing 2019-02-15 17:06:11 +01:00
stsypanov 5e29ea30a3 Use StringJoiner where possible to simplify String joining 2019-02-15 14:55:35 +01:00
stsypanov e7dc439f90 Simplify ConcurrentReferenceHashMap 2019-02-15 14:27:43 +01:00
stsypanov d2bfca7900 Extract duplicated code into a separate method 2019-02-15 14:26:44 +01:00
stsypanov 92053bb84e Some very simple improvements regarding ArrayList 2019-02-15 14:25:13 +01:00
Juergen Hoeller 5e0cd9fb60 Merge branch '5.1.x' 2019-02-14 13:39:58 +01:00
Juergen Hoeller ac0e5d8ec6 DefaultConversionService properly converts Object[] to int[]
Closes gh-22410
2019-02-14 13:38:29 +01:00
Juergen Hoeller 4e47006a17 Merge branch '5.1.x' 2019-02-12 09:09:19 +01:00
Juergen Hoeller 106a757098 Polishing 2019-02-12 09:07:58 +01:00
Juergen Hoeller 8637540678 Expose empty annotation array as empty AnnotationAttributes array
Closes gh-22405
2019-02-12 09:07:51 +01:00
Brian Clozel fb4a28f904 Polish
See gh-22340
2019-02-11 10:45:50 +01:00
Juergen Hoeller 783a7ca46b Merge branch '5.1.x' 2019-02-08 18:16:27 +01:00
Juergen Hoeller ba0c48b933 Polishing 2019-02-08 18:02:28 +01:00
Brian Clozel 05d7ab4328 Merge branch '5.1.x' 2019-02-06 20:00:02 +01:00
Brian Clozel ef8652615c Log exception at ERROR level in CompositeLog
Fixes gh-22364
2019-02-06 19:58:41 +01:00
Juergen Hoeller 34ddb1e3cd Merge branch '5.1.x' 2019-02-05 16:32:58 +01:00
Juergen Hoeller 9895e44d73 Polishing 2019-02-05 16:03:24 +01:00
Juergen Hoeller 643a68f81b Detect existing jar URLs from URLClassLoader.getURLs()
Closes gh-22346
2019-02-05 16:02:50 +01:00
Sebastien Deleuze 0b9522c84e Migrate Kotlin Mockito tests to Mockk
Closes gh-22345
2019-02-05 15:47:08 +01:00
Juergen Hoeller 4c9ae6494f Concurrency/nullability fine-tuning in MimeType(Utils)
See gh-22340
2019-02-05 15:38:41 +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
Brian Clozel 862fa557bd Avoid java.util.stream.Stream usage in hot paths
Prior to this commit, profiling sessions would show that using
`java.util.stream.Stream` in some hot code paths creates significant
garbage.

Where streams aren't really required, this commit turns those snippets
into imperative logic  because those are likely to be called once or
multiple times per request.

Closes gh-22341
2019-02-05 12:14:51 +01:00
Juergen Hoeller d27bae245a Polishing 2019-02-05 00:45:28 +01:00
Juergen Hoeller a27a6470f7 Polishing 2019-02-05 00:10:22 +01:00
stsypanov 248d3f8e8b Use AtomicInteger instead of unsafe increment on volatile fields 2019-02-04 23:22:20 +01:00
Juergen Hoeller 80385ced4c Remove java.sql dependency from ReflectionUtils/TransactionDefinition
Fixes gh-21996
2019-01-28 22:50:11 +01:00
Arjen Poutsma 4732f83d70 Fix Java 9 Build
Fix Java 9 build by replacing deprecated method.
2019-01-24 15:44:58 +01:00
Brian Clozel 2b65d0e51f Fix error when writing empty String to DataBuffer
Prior to this commit, `DataBuffer.write` would throw an
`IllegalStateException` when called with an empty `String`, since the
`CharsetEncoder` would be flushed on an incorrent state.

This commit skips entirely the encoding phase for empty `String`.

Fixes #22262
2019-01-17 11:09:48 -05:00
Juergen Hoeller 72dddfbc7b Polishing 2019-01-09 12:26:58 +01:00
Andrzej Leśkiewicz 952045c216 SPR-17606 @Profile mishandles "not" operand mixed with "&" (#2066)
Correct handling of not/and expressions in ProfilesParser

Issue: SPR-17606
2019-01-08 22:24:15 +01:00
Juergen Hoeller f56fa91430 Polishing 2019-01-08 17:11:34 +01:00