Prior to this commit, DefaultServerRequest's ServletParametersMap lost
the original parameter order when entrySet() was invoked.
To address that, this commit revises ServletParametersMap.entrySet() so
that it stores the results in a LinkedHashSet, thereby retaining the
original order.
Closes gh-36966
XmlValidationModeDetector peeks at the start of an XML document to
choose between DTD- and XSD-based validation, skipping any DOCTYPE that
appears inside an XML comment.
Prior to this commit, consumeCommentTokens() short-circuited a line
with no start or end comment marker by returning it unchanged, even
while already inside a multi-line comment. Such a body line was then
treated as content, so a literal "DOCTYPE" word in the comment body
caused an XSD document to be misdetected as DTD-based.
This commit honors the "in comment" parse state in that early return so
a comment body line is treated as empty content, completing the fix for
gh-27915 which only covered comment markers on the same line.
Closes gh-36948
Signed-off-by: junhyeong9812 <pickjog@gmail.com>
Prior to this commit, a `Number` was converted to a `String` and then
the string was parsed/matched using regular expressions back into a
suitable `long` which was inefficient and also prevented valid data
size values such as 10.0.
To address those issues, this commit refactors
NumberToDataSizeConverter to use DataSize.ofBytes(long) directly, first
checking that the supplied Number does not have a fractional part.
Closes gh-36956
Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
Prior to this commit, ThrowawayClassLoader.loadClass fell back to
loadClassFromResource(), which returns null when no class resource is
available. Returning null from loadClass violates the ClassLoader
contract and leads to a NullPointerException in callers such as
PreComputeFieldFeature.
To address that, this commit rethrows the original
ClassNotFoundException when the resource fallback yields no class.
Closes gh-36938
Signed-off-by: junhyeong9812 <pickjog@gmail.com>
Spring Boot already provides equivalent converters, and DataSize itself
already exposes parsing support via DataSize.parse(...).
This commit makes that conversion available through Spring Framework's
default conversion service.
- new StringToDataSizeConverter
- new NumberToDataSizeConverter
- both converters are registered with the DefaultConversionService
- new tests for string, number, empty, and invalid inputs
This intentionally does not move Spring Boot's @DataSizeUnit support
into Spring Framework.
See gh-28910
Closes gh-36830
Signed-off-by: YeongJae Min <whereismysejong@naver.com>
Move the nested InternalParser class up, merging it with the top-level
MultipartParser, make the constructor private, and expose a static
parse method.
awaitAsyncDispatch() catches InterruptedException, returns false, and
discards the interruption. Catching InterruptedException without
rethrowing should restore the interrupt status (as is done across the
framework's main sources), so re-assert it before returning false.
Closes gh-36876
Signed-off-by: leestana01 <leestana01@naver.com>
Prior to this commit, ThrowawayClassLoader#loadClassFromResource opened
an InputStream via getResourceAsStream(...) but never closed it. The
stream leaked on both the success path (after defineClass) and the
IOException path, as the surrounding try-block had neither a finally
nor a try-with-resources clause.
This commit adapts the existing inputStream variable as a
try-with-resources resource so that it is closed on every path, leaving
the loading logic unchanged.
Closes gh-36933
Signed-off-by: junhyeong9812 <pickjog@gmail.com>
In order to avoid the staircase scaling effect that results from our
current use of integer division, this commit revises applyJitter(long)
in ExponentialBackOffExecution to use floating-point (double) division
to calculate the applied jitter.
Closes gh-36943