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
When an ExponentialBackOff is configured with an initialInterval of 0
and a positive jitter, the first nextBackOff() evaluated (jitter *
(interval / initialInterval)) performs integer division by zero
and throws an ArithmeticException.
Both initialInterval = 0 and jitter > 0 are individually accepted
configurations -- with jitter = 0, an initialInterval of 0 already
yields a delay of 0 -- so the combination should not throw.
This commit addresses that by guarding the division so that no jitter
scaling is applied when initialInterval is 0, leaving the behavior for
positive intervals unchanged.
Closes gh-36932
Signed-off-by: junhyeong9812 <pickjog@gmail.com>