Prior to this commit, parallel invocations of
MethodParameter.findParameterIndex() (invoked indirectly via
SynthesizingMethodParameter.forParameter() and
MethodParameter.forParameter()) could intermittently lead to an
IllegalArgumentException being thrown due to a race condition in the
internal implementation of the JDK's
java.lang.reflect.Executable.getParameters() method.
This commit addresses this issue by introducing a fallback for-loop
that iterates over the candidate parameters a second time using
equality checks instead of identity checks.
Issue: SPR-17534
This commit reverts the first optimizations listed in
fa096dc60f, as the default delimiters
do vary, namely by the charset given in the message mime type.
The mimetype charset might not be compatible with ASCII (i.e. anything
but UTF-8 or ISO-8859-1, for instance it might be UTF-16), and will not
successfully find the default delimiters as a consequence.
Added test to indicate the bug.
This CGLIB upgrade literally does not make any difference to Spring users since its only purpose is a default ASM7 declaration in its AsmApi class (which we patched a month ago). We nevertheless leave our local AsmApi copy in place for the time being, allowing for an individual upgrade of the declared ASM API version in the future.
Issue: SPR-17267
Issue: SPR-17371
1. Avoid re-creating the List with delimited byte arrays on every
request if using the default delimiters which don't vary by charset.
2. Replace flatMap with flatMapIterable for splitOnDelimiter.
3. Avoid going through DataBufferUtils#join, and unnecessarily creating
Flux from the List, since the join method needs a list anyway.
Fix ResourceRegionEncoder so that it checks for resource existance
before writing boundaries. Also defer data buffer allocation until
necessary.
Issue: SPR-17419