Commit Graph

34324 Commits

Author SHA1 Message Date
Juergen Hoeller 85c6fb0fd0 Add invoke(Runnable) as variant of invoke(Supplier)
See gh-36052
2025-12-21 21:40:50 +01:00
Juergen Hoeller 0b2bb7e751 Declare TaskCallback return value as potentially nullable
Closes gh-36057
2025-12-20 15:21:14 +01:00
Juergen Hoeller faa17abdae Introduce invoke(Supplier) with last original RuntimeException propagated
Closes gh-36052
2025-12-20 15:20:58 +01:00
Brian Clozel 89ca8e6976 Document how to discard response body with WebTestClient
This commit better documents the ways to discard the response body with
`WebTestClient`.

Closes gh-35953
2025-12-19 16:48:57 +01:00
Brian Clozel 7353ab41d2 Fix memory leak in WiretapConnector
Prior to this commit, we found in gh-35953 that using the `WebTestClient`
the following way leaks data buffers:

```
var body = client.get().uri("download")
  .exchange()
  .expectStatus().isOk()
  .returnResult()
  .getResponseBodyContent();
```

Here, the test performs expectations on the response status and headers,
but not on the response body. The WiretapConnector already supports this
case by subscribing to the Flux response body in those cases and
accumulating the entire content as a single byte[].

Here, the `DataBuffer` instances are not decoded by any `Decoder` and
are not released. This results in a memory leak.

This commit ensures that the automatic subscription in
`WiretapConnector` also releases the buffers automatically as the DSL
does not allow at that point to go back to performing body expectations.

Fixes gh-36050
2025-12-19 16:10:33 +01:00
Stéphane Nicoll f1db0ef036 Do not display error location when unknown
Closes gh-36041
2025-12-17 14:33:14 +01:00
Stéphane Nicoll e9a4b93477 Expose compiler warnings in CompilationException
This commit improves TestCompiler to expose both errors and warnings
instead of an opaque message. When compilation fails, both errors and
warnings are displayed.

This is particularly useful when combined with the `-Werror` option
that turns the presence of a warning into an error.

Closes gh-36037
2025-12-17 14:33:14 +01:00
Juergen Hoeller 86e89d53a9 Do not attempt nested PropertyHandler resolution for argument conversion
Includes fix for return type declaration in PropertyAccessor subclasses.

See gh-36024
2025-12-17 14:30:44 +01:00
Juergen Hoeller c813577908 Consistently use DefaultParameterNameDiscoverer.getSharedInstance()
This includes MethodParameter resolving getParameterName() by default now.
initParameterNameDiscovery(null) can be used to suppress such resolution.

Closes gh-36024
2025-12-17 13:39:02 +01:00
Brian Clozel ec6b7730a2 Polishing contribution
Closes gh-36032
2025-12-17 12:35:30 +01:00
jher235 fc29d88778 Use StringBuilder in JdbcTemplate for batch updates
See gh-36032

Signed-off-by: jher235 <tim668666@gmail.com>
2025-12-17 12:35:30 +01:00
Brian Clozel 033df68da6 Fix Javadoc links 2025-12-17 10:21:30 +01:00
Brian Clozel df5b06dabc Fix RfcUriParser parsing for single char fragments
Prior to this commit, the `RfcUriParser` would ignore URI fragments if
their length is < 2. This commit fixes the length check to allow for
single char fragments when parsing URIs.

Fixes gh-36029
2025-12-17 09:51:53 +01:00
Juergen Hoeller 3d8d7ffa1e Upgrade to AspectJ 1.9.25, Tomcat 11.0.15, Netty 4.2.9, Jackson 3.0.3, EclipseLink 5.0.0-B13, Mockito 5.21, Checkstyle 12.3 2025-12-16 13:55:36 +01:00
Juergen Hoeller 6d5a512d90 Suppress serial warning 2025-12-16 13:54:40 +01:00
Sébastien Deleuze d4e4250bb1 Remove JavaScript/Kotlin from ScriptEngine documentation
Closes gh-27919
2025-12-15 18:43:09 +01:00
Sam Brannen 93bc022a46 Extract CopyPropertiesTests as nested test class in BeanUtilsTests 2025-12-15 18:11:35 +01:00
Sam Brannen a4c72c8fcf Polish integration tests 2025-12-15 15:05:05 +01:00
Juergen Hoeller 3d7862abb6 Upgrade to Hibernate ORM 7.2.0.Final 2025-12-15 14:27:39 +01:00
Juergen Hoeller 7fd0c5041d Use default ConstraintValidatorFactory for provider-internal validators
Closes gh-36012
2025-12-15 14:26:58 +01:00
Juergen Hoeller d99ace81c1 Enforce publicly accessible method for externalClassLoader(ClassLoader)
Closes gh-36012
2025-12-14 14:48:33 +01:00
Sam Brannen ed451c107f Polishing 2025-12-13 17:11:05 +01:00
Sam Brannen 452257eb96 Revise contribution
See gh-36022
2025-12-13 17:10:06 +01:00
Tran Ngoc Nhan a7863a0877 Fix typos and grammar in reference manual
Closes gh-36022

Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
2025-12-13 16:50:39 +01:00
Sam Brannen 1da0e13a2b Polishing 2025-12-12 15:41:23 +01:00
Stéphane Nicoll ee6a156275 Refresh GitHub Actions 2025-12-12 11:51:11 +01:00
Brian Clozel 0b6fe8dcc5 Next development version (v7.0.3-SNAPSHOT) 2025-12-11 17:34:57 +01:00
Juergen Hoeller e2c9dc7138 Revert to previous behavior for 7.0.2 (based on Boot/Data impact)
Preparing the revised behavior for 7.1 instead.

See gh-31456
2025-12-11 15:37:41 +01:00
Sam Brannen 1818161f58 Ensure bottom-up semantics in resolveDefaultContextConfigurationAttributes()
Closes gh-31456
2025-12-11 13:37:32 +01:00
Sam Brannen 8916ee9f81 Set inheritLocations to true in ContextConfigurationAttributes constructor
Closes gh-36000
2025-12-11 13:06:50 +01:00
Brian Clozel d835fe311d Do not send null HTTP header value in JdkClientHttpRequest
Prior to this commit, the `JdkClientHttpRequest` would add all values
from `HttpHeaders` to the native request builder. This could cause
`NullPointerException` being thrown at runtime because the `HttpClient`
does not support that.

This commit replicates a fix that was applied to the
`SimpleClientHttpRequest`, turning null values into empty "".

Fixes gh-35996
2025-12-11 09:45:30 +01:00
rstoyanchev 0eefac21c9 Polishing contribution
Closes gh-35758
2025-12-10 18:17:12 +00:00
Samuel Gulliksson e99791f289 Improve i18n-support for NoResourceFoundException.
Return the requested resource as ErrorResponse.getDetailMessageArguments,
making it usable with message customization and i18n.

See gh-35758

Signed-off-by: Samuel Gulliksson <samuel.gulliksson@gmail.com>
2025-12-10 18:17:12 +00:00
Sam Brannen 658775b914 Avoid unnecessary list creation & processing in AbstractTestContextBootstrapper
Closes gh-35995
2025-12-10 18:56:57 +01:00
Sam Brannen ea7a1d789e Resolve ContextLoader only once in AbstractTestContextBootstrapper
Closes gh-35994
2025-12-10 18:56:50 +01:00
Sam Brannen 4ae471df01 Resolve all default context configuration within @⁠Nested hierarchy
Prior to this commit, if an enclosing test class (such as one annotated
with @⁠SpringBootTest or simply @⁠ExtendWith(SpringExtension.class))
was not annotated with @⁠ContextConfiguration (or @⁠Import with
@⁠SpringBootTest), the ApplicationContext loaded for a @⁠Nested test
class would not use any default context configuration for the enclosing
test class.

Effectively, a default XML configuration file or static nested
@⁠Configuration class for the enclosing test class was not discovered
by the AbstractTestContextBootstrapper when attempting to build the
MergedContextConfiguration (application context cache key).

To address that, this commit introduces a new
resolveDefaultContextConfigurationAttributes() method in
ContextLoaderUtils which is responsible for creating instances of
ContextConfigurationAttributes for all superclasses and enclosing
classes. This effectively enables AbstractTestContextBootstrapper to
delegate to the resolved SmartContextLoader to properly detect a
default XML configuration file or static nested @⁠Configuration class
even if such classes are not annotated with @⁠ContextConfiguration.

Closes gh-31456
2025-12-10 18:56:42 +01:00
Sam Brannen 75e3f44a7b Update Javadoc due to changes in retry support
See gh-35940
2025-12-10 16:45:43 +01:00
Juergen Hoeller adcd7cb4cb Introduce RetryListener#onRetryableExecution callback with RetryState
Closes gh-35940
2025-12-10 15:09:33 +01:00
Sam Brannen d0be180a69 Make @​Retryable and RetryTemplate timeout tests more robust
See gh-35963
2025-12-10 14:22:42 +01:00
Sam Brannen 3731fed4ca Revise MultiValueMapCollector implementation and tests
See https://github.com/spring-projects/spring-data-commons/issues/3420
Closes gh-35958
2025-12-10 13:35:00 +01:00
u214578 bfc02cda0c Introduce MultiValueMapCollector for use with streams
See https://github.com/spring-projects/spring-data-commons/issues/3420
See gh-35958

Signed-off-by: Florian Hof <florian.hof@sbb.ch>
2025-12-10 13:28:59 +01:00
Sam Brannen f734d04a0d Fix grammar 2025-12-10 13:28:59 +01:00
Sam Brannen ce4c9ebe3c Polishing 2025-12-10 12:31:26 +01:00
Brian Clozel 7c4801304d Upgrade to Reactor 2025.0.1
Closes gh-35985
2025-12-09 22:19:53 +01:00
Brian Clozel 2731183420 Upgrade to Micrometer 1.16.1
Closes gh-35984
2025-12-09 22:18:03 +01:00
Sam Brannen 38cf4ab3fc Make RetryTemplate timeout tests more robust
See gh-35963
2025-12-09 17:03:41 +01:00
Sam Brannen 2137ec70d2 Make @​Retryable timeout tests more robust
See gh-35963
2025-12-09 16:56:53 +01:00
Sam Brannen 61201db704 Improve error message for preemptive timeout in RetryTemplate
The error message in such cases now indicates that the retry process
is being aborted preemptively due to pending sleep time.

For example:

  Retry policy for operation 'myMethod' would exceed timeout (5 ms) due
  to pending sleep time (10 ms); preemptively aborting execution

See gh-35963
2025-12-09 16:46:44 +01:00
Sam Brannen 2643c6212f Delete obsolete test code 2025-12-09 16:39:20 +01:00
Sam Brannen b46328a000 Fix broken assertions in @​Retryable timeout tests
See gh-35963
2025-12-09 16:38:05 +01:00