Commit Graph

32005 Commits

Author SHA1 Message Date
Sam Brannen
f40d98668d Revise configuration for javadoc Gradle tasks
Closes gh-34766
2025-04-16 13:42:05 +02:00
rstoyanchev
9c13c6b695 Revert "Use optimistic locking where possible in ResponseBodyEmitter"
This reverts commit e67f892e44.

Closes gh-34762
2025-04-16 11:53:22 +01:00
rstoyanchev
b49924ba37 Revert "Fix handling of timeout in SseEmitter"
This reverts commit f92f9c1d5b.

See gh-34762
2025-04-16 11:41:00 +01:00
Stéphane Nicoll
7b8c104077 Upgrade to github-changelog-generator 0.0.12
Closes gh-34755
2025-04-15 10:04:45 +02:00
Sam Brannen
8f62a8f579 Suppress recently introduced warning 2025-04-14 14:25:48 +02:00
Sam Brannen
d0966dfb58 Revise contribution
See gh-34747
2025-04-14 14:15:50 +02:00
lituizi
bb45a3ae69 Update AbstractAutowireCapableBeanFactory.ignoreDependencyInterface() Javadoc
Specifically, the documentation update reflects that:

- Initially, it was mentioned that only the `BeanFactoryAware`
  interface is ignored by default.

- The updated documentation now correctly states that `BeanNameAware`,
  `BeanFactoryAware`, and `BeanClassLoaderAware` interfaces are all
  ignored by default.

This change ensures a more accurate representation of the default
behavior regarding which dependency interfaces are automatically
ignored during autowiring in the context of Spring's bean factory
mechanism.

Closes gh-34747

Signed-off-by: lituizi <2811328244@qq.com>
2025-04-14 14:07:35 +02:00
Sam Brannen
7095f4cb66 Use proper casing for parameter and variable names 2025-04-14 11:25:40 +02:00
Sam Brannen
a22d204681 Remove duplicate words in Java source code
Discovered using regular expression: \b(\w+)\s+\1\b[^(}]
2025-04-14 11:24:55 +02:00
Sam Brannen
f27382cfb6 Consistently indent code with tabs in reference manual 2025-04-14 11:22:08 +02:00
Sam Brannen
6bc196883a Fix heading for "Context Configuration with Context Customizers" 2025-04-14 11:22:08 +02:00
Juergen Hoeller
c4f66b776f Use single volatile field for indicating pre-instantiation phase
See gh-34729
2025-04-12 06:00:18 +02:00
Sam Brannen
87e04df983 Upgrade to JUnit 5.12.2 2025-04-11 16:58:23 +02:00
Sam Brannen
4d648f8b5d Clean up warnings in Gradle build 2025-04-11 16:57:57 +02:00
Juergen Hoeller
6ea9f66fd7 Remove superfluous DefaultParameterNameDiscoverer configuration 2025-04-10 18:33:39 +02:00
Juergen Hoeller
eea6addd26 Avoid lenient locking for additional external bootstrap threads
Includes spring.locking.strict revision to differentiate between true, false, not set.
Includes checkFlag accessor on SpringProperties, also used in StatementCreatorUtils.

Closes gh-34729
See gh-34303
2025-04-10 18:33:21 +02:00
Juergen Hoeller
7f2c1f447f Try loadClass on LinkageError in case of ClassLoader mismatch
See gh-34677
2025-04-10 18:30:45 +02:00
Sam Brannen
26869b0e4c Polish Bean Override internals 2025-04-10 17:06:27 +02:00
Sam Brannen
cd987fc104 Update Javadoc to stop mentioning 5.3.x as the status quo
Closes gh-34740
2025-04-10 16:40:04 +02:00
Sam Brannen
3f9402a56b Update testing documentation to reflect status quo 2025-04-10 15:06:52 +02:00
Sam Brannen
c168e1c297 Provide first-class support for Bean Overrides with @⁠ContextHierarchy
This commit provides first-class support for Bean Overrides
(@⁠MockitoBean, @⁠MockitoSpyBean, @⁠TestBean, etc.) with
@⁠ContextHierarchy.

Specifically, bean overrides can now specify which ApplicationContext
they target within the context hierarchy by configuring the
`contextName` attribute in the annotation. The `contextName` must match
a corresponding `name` configured via @⁠ContextConfiguration.

For example, the following test class configures the name of the second
hierarchy level to be "child" and simultaneously specifies that the
ExampleService should be wrapped in a Mockito spy in the context named
"child". Consequently, Spring will only attempt to create the spy in
the "child" context and will not attempt to create the spy in the
parent context.

@⁠ExtendWith(SpringExtension.class)
@⁠ContextHierarchy({
    @⁠ContextConfiguration(classes = Config1.class),
    @⁠ContextConfiguration(classes = Config2.class, name = "child")
})
class MockitoSpyBeanContextHierarchyTests {

    @⁠MockitoSpyBean(contextName = "child")
    ExampleService service;

    // ...
}

See gh-33293
See gh-34597
See gh-34726
Closes gh-34723

Signed-off-by: Sam Brannen <104798+sbrannen@users.noreply.github.com>
2025-04-10 14:46:50 +02:00
Juergen Hoeller
3afd551174 Add rejectTasksWhenLimitReached option for concurrency limit
Closes gh-34727
2025-04-07 23:54:05 +02:00
Juergen Hoeller
ffd15155ee Upgrade to Mockito 5.17 and Checkstyle 10.23 2025-04-07 22:41:45 +02:00
Juergen Hoeller
74ab5e4e25 Enforce circular reference exception between more than two threads as well
See gh-34672
2025-04-07 22:37:19 +02:00
Juergen Hoeller
463541967a Enforce circular reference exception between all thread variations
Closes gh-34672
2025-04-07 17:08:47 +02:00
Sam Brannen
4510b78dfd Include @⁠ContextCustomizerFactories in @⁠NestedTestConfiguration Javadoc 2025-04-07 15:57:20 +02:00
Sam Brannen
63f4ba4b2a Move field injection logic to BeanOverrideTestExecutionListener
For bean override support (@⁠MockitoBean, @⁠TestBean, etc.), the logic
for field injection previously resided in the BeanOverrideRegistry
which resulted in a strange mixture of concerns.

To address that, this commit moves the field injection logic to the
BeanOverrideTestExecutionListener, and the BeanOverrideRegistry now
serves a single role, namely the role of a registry.

Closes gh-34726
2025-04-07 14:05:58 +02:00
Sam Brannen
0c7bc232d6 Redesign BeanOverrideRegistry internals 2025-04-07 13:42:11 +02:00
Sam Brannen
470bf3b0bb Add missing Javadoc for BeanOverrideHandler constructor 2025-04-06 18:18:07 +02:00
Sam Brannen
2ca9f6f064 Indent with tabs instead of spaces in Gradle build scripts 2025-04-06 17:39:23 +02:00
Johnny Lim
ecd8cd797e Use implementation Gradle configuration for framework-docs module
Closes gh-34719

Signed-off-by: Johnny Lim <izeye@naver.com>
2025-04-06 17:28:34 +02:00
Juergen Hoeller
cc5ae23915 Suppress rollback attempt in case of timeout (connection closed)
Closes gh-34714
2025-04-05 16:03:31 +02:00
Sam Brannen
dbd47ff4f9 Implement additional micro performance optimizations
See gh-34717
2025-04-04 15:51:37 +02:00
Sam Brannen
381bc4c405 Polish contribution
See gh-34717
2025-04-04 15:29:10 +02:00
Olivier Bourgain
0f2308e85f Implement micro performance optimizations
- ClassUtils.isAssignable(): Avoid Map lookup when the type is not a
  primitive.

- AnnotationsScanner: Perform low cost array length check before String
  comparisons.

- BeanFactoryUtils: Use char comparison instead of String comparison.
  The bean factory prefix is '&', so we can use a char comparison
  instead of more heavyweight String.startsWith("&").

- AbstractBeanFactory.getMergedBeanDefinition(): Perform the low cost
  check first. Map lookup, while cheap, is still more expensive than
  instanceof.

Closes gh-34717

Signed-off-by: Olivier Bourgain <olivierbourgain02@gmail.com>
2025-04-04 14:34:55 +02:00
Juergen Hoeller
ee804ee8fb Avoid throwing of plain RuntimeException 2025-04-04 00:22:24 +02:00
Juergen Hoeller
4e5979c75a Consistent CacheErrorHandler processing for @Cacheable(sync=true)
Closes gh-34708
2025-04-04 00:22:12 +02:00
Juergen Hoeller
e7db15b325 Perform type check before singleton check for early FactoryBean matching
Closes gh-34710
2025-04-03 11:59:22 +02:00
Sam Brannen
8f9cbcd86d Add @⁠since tags
See gh-34692
2025-04-03 10:33:19 +02:00
Juergen Hoeller
6bb964e2d0 Explicitly use original ClassLoader in case of package visibility
Closes gh-34684
2025-04-02 23:41:43 +02:00
Taeik Lim
a946fe2bf8 Fix broken link for Server-Sent Events
Signed-off-by: Taeik Lim <sibera21@gmail.com>
Closes gh-34705
2025-04-02 17:43:42 +02:00
Sébastien Deleuze
671d972454 Add RestClient.RequestHeadersSpec#exchangeForRequiredValue
This commit adds a variant to RestClient.RequestHeadersSpec#exchange
suitable for functions returning non-null values.

Closes gh-34692
2025-04-02 17:10:01 +02:00
Sébastien Deleuze
d9047d39e6 Refine ExchangeFunction Javadoc
See gh-34692
2025-04-02 17:10:01 +02:00
Sébastien Deleuze
4db12806d1 Revert "Add a requiredExchange extension to RestClient"
This reverts commit dcb9383ba1.

See gh-34692
2025-04-02 17:10:01 +02:00
rstoyanchev
290c9c4a19 Use form charset in ServletServerHttpRequest
Closes gh-34675
2025-04-02 09:05:52 +01:00
rstoyanchev
e01ad5a08d Polishing in ServletServerHttpRequest
See gh-34675
2025-04-02 09:05:52 +01:00
Brian Clozel
b8158df3d6 Create new observation context for WebClient retries
Prior to this commit, the `DefaultWebClient` observability
instrumentation would create the observation context before the reactive
pipeline is fully materialized. In case of errors and retries (with the
`retry(long)` operator), the observation context would be reused for
separate observations, which is incorrect.

This commit ensures that a new observation context is created for each
subscription.

Fixes gh-34671
2025-04-02 09:37:16 +02:00
Juergen Hoeller
c4e25a1162 Upgrade to Jetty 12.0.18, Apache HttpClient 5.4.3, Protobuf 4.30.2, Checkstyle 10.22 2025-04-01 23:24:25 +02:00
Juergen Hoeller
48009c8534 Introduce support for concurrent startup phases with timeouts
Closes gh-34634
2025-04-01 22:18:26 +02:00
Juergen Hoeller
203ca30a64 Include cause in MethodInvocationException message
Closes gh-34691
2025-04-01 22:12:17 +02:00