Commit Graph

31839 Commits

Author SHA1 Message Date
Johnny Lim 3c40e5e501 Add Javadoc since for HandlerMethod(HandlerMethod, Object, boolean)
See 56c4d2d

Closes gh-34431
Signed-off-by: Johnny Lim <izeye@naver.com>
2025-02-16 12:10:01 +01:00
Sam Brannen 9e45178202 Stop referring to "Java 8" in AnnotationUtils 2025-02-13 15:59:20 +01:00
Sam Brannen d82e70e345 Cross reference annotation search APIs in Javadoc
Closes gh-34421
2025-02-13 15:59:08 +01:00
Stéphane Nicoll 1109892134 Next development version (v6.2.4-SNAPSHOT) 2025-02-13 14:19:02 +01:00
Sam Brannen a8be11ebaf Upgrade to TestNG 7.11 2025-02-13 13:08:54 +01:00
Juergen Hoeller dfc10c1a8d Wait for lenient bean creation in non-locked threads as well
Closes gh-34349
2025-02-12 23:06:22 +01:00
Juergen Hoeller bbb593db48 Consistently ignore non-jar files in classpath
Closes gh-34417
2025-02-12 19:18:30 +01:00
Sam Brannen b2134ee71f Avoid Gradle build warnings about @⁠SuppressFBWarnings from FindBugs
In order to avoid Gradle build warnings about @⁠SuppressFBWarnings, this
commit introduces a testCompileOnly dependency on `findbugs` in the
spring-webmvc module so that the class file for @⁠SuppressFBWarnings is
available to the compileTestJava task.

Closes gh-34418
2025-02-12 17:49:23 +01:00
Sam Brannen 440a259b71 Clean up warnings in Gradle build 2025-02-12 16:46:41 +01:00
Sam Brannen 6174055910 Link to @⁠MockitoBean, @⁠MockitoSpyBean, & @⁠TestBean Javadoc from ref docs 2025-02-12 16:31:33 +01:00
Sam Brannen e31ce359a1 Support @⁠MockitoSpyBean at the type level on test classes
Prior to this commit, @⁠MockitoSpyBean could only be declared on fields
within test classes, which prevented developers from being able to
easily reuse spy configuration across a test suite.

With this commit, @⁠MockitoSpyBean is now supported at the type level
on test classes, their superclasses, and interfaces implemented by
those classes. @⁠MockitoSpyBean is also supported on enclosing classes
for @⁠Nested test classes, their superclasses, and interfaces
implemented by those classes, while honoring @⁠NestedTestConfiguration
semantics.

In addition, @⁠MockitoSpyBean:

- has a new `types` attribute that can be used to declare the type or
  types to spy when @⁠MockitoSpyBean is declared at the type level

- can be declared as a repeatable annotation at the type level

- can be declared as a meta-annotation on a custom composed annotation
  which can be reused across a test suite (see the @⁠SharedSpies
  example in the reference manual)

To support these new features, this commit also includes the following
changes.

- MockitoSpyBeanOverrideProcessor has been revised to support
  @⁠MockitoSpyBean at the type level.

- The "Bean Overriding in Tests" and "@⁠MockitoBean and
  @⁠MockitoSpyBean" sections of the reference manual have been fully
  revised.

See gh-34408
Closes gh-33925
2025-02-12 15:54:54 +01:00
Juergen Hoeller b336bbe539 Wait for lenient bean creation in locked thread when necessary
Closes gh-34349
2025-02-12 12:17:02 +01:00
Sébastien Deleuze 056757b493 Refine tests in MockMvcExtensionsTests
Closes gh-34412
2025-02-12 11:33:42 +01:00
Kevin Houtz 79c5fec1be Add form fields support to MockMvc Kotlin DSL
See gh-34412

Signed-off-by: Kevin Houtz <kevin@khoutz.com>
2025-02-12 11:33:29 +01:00
Brian Clozel 689782cbad Make ProblemDetail Serializable
This commit makes the `ProblemDetail` type implement `Serializable` in
order to be serialized and shared in distributed systems.

Closes gh-34409
2025-02-11 22:33:05 +01:00
Juergen Hoeller 2df90e32c0 Upgrade to Netty 4.1.118 and Checkstyle 10.21.2 2025-02-11 22:10:15 +01:00
Juergen Hoeller f53da04717 Align with SmartClassLoader handling for AOP proxy classes
Closes gh-34274
2025-02-11 22:10:02 +01:00
Sam Brannen 124b38450b Remove unused code and improve assertion
See gh-34363
2025-02-11 16:30:52 +01:00
Sam Brannen b07217ab67 Use ConversionService to convert POJO to array for SpEL varargs invocations
Prior to this commit, if an appropriate Converter was registered with
the ConversionService that converts from a POJO to an array and that
ConversionService was registered with the Spring Expression Language
(SpEL) TypeConverter, an attempt to invoke a varargs method in a SpEL
expression with such a POJO would fail because the ConversionService
was not used to convert the POJO to an array suitable for the varargs
method invocation.

This commit revises the implementations of convertArguments(...) and
convertAllMethodHandleArguments(...) in ReflectionHelper to support
such use cases.

Closes gh-34371
2025-02-11 16:11:13 +01:00
Sam Brannen aa7e84c89f Polishing 2025-02-11 16:11:13 +01:00
Stéphane Nicoll bd1c7b379f Merge pull request #34400 from canattofilipe
* pr/34400:
  Polish "Use correct method to retrieve DefaultListableBeanFactory"
  Use correct method to retrieve DefaultListableBeanFactory

Closes gh-34400
2025-02-11 16:01:04 +01:00
Stéphane Nicoll 6af19244a5 Polish "Use correct method to retrieve DefaultListableBeanFactory"
See gh-34400
2025-02-11 16:00:34 +01:00
canattofilipe 328dd71f6e Use correct method to retrieve DefaultListableBeanFactory
See gh-34400

Signed-off-by: canattofilipe <canattofilipe@gmail.com>
2025-02-11 15:57:01 +01:00
rstoyanchev d04883f839 HTTP Interface client handles query param with ":"
Closes gh-34364
2025-02-11 11:11:05 +00:00
rstoyanchev 9f55296049 Nested list/map/array with constructor binding
Closes gh-34305
2025-02-11 11:11:05 +00:00
rstoyanchev 4591a67641 Handle [] leniently in constructor binding
See gh-34305
2025-02-11 11:11:05 +00:00
Sam Brannen 9797bc0acd Expose order values of TestExecutionListener implementations as constants
Prior to this commit, the order values of TestExecutionListener
implementations were hard-coded in their getOrder() methods.

To benefit users and integrators, this commit exposes those order values
as an ORDER constant in each TestExecutionListener.

See gh-34225
Closes gh-34404
2025-02-11 11:53:33 +01:00
Sam Brannen 9d3374b28d Finish incomplete sentences 2025-02-11 11:53:33 +01:00
Sam Brannen 09086fc648 Revise TestExecutionListener order values documentation
See gh-34265
2025-02-11 11:53:33 +01:00
Mengqi Xu 128e90064e Document order values for TestExecutionListener implementations
Closes gh-34265

Signed-off-by: Mengqi Xu <2663479778@qq.com>
2025-02-11 11:53:33 +01:00
Stéphane Nicoll 16e3973118 Upgrade to Reactor 2024.0.3
Closes gh-34403
2025-02-11 11:36:47 +01:00
Stéphane Nicoll 5c37d07ad3 Upgrade to RSocket 1.1.5
Closes gh-34402
2025-02-11 10:39:21 +01:00
Stéphane Nicoll 12891d1975 Upgrade to Micrometer 1.14.4
Closes gh-34401
2025-02-11 10:34:33 +01:00
Juergen Hoeller 1ca941ba9a Consistently resolve renamed type variables
Closes gh-34386
2025-02-10 15:51:39 +01:00
Sam Brannen 17a94fb110 Improve warning for unexpected use of value attribute as @⁠Component name
Prior to this commit, if a String 'value' attribute of an annotation
was annotated with @⁠AliasFor and explicitly configured to alias an
attribute other than @⁠Component.value, the value was still used as the
@⁠Component name, but the warning message that was logged stated that
the 'value' attribute should be annotated with
@⁠AliasFor(annotation=Component.class). However, it is not possible to
annotate an annotation attribute twice with @⁠AliasFor.

To address that, this commit revises the logic in
AnnotationBeanNameGenerator so that it issues a log message similar to
the following in such scenarios.

WARN o.s.c.a.AnnotationBeanNameGenerator - Although the 'value'
attribute in @⁠example.MyStereotype declares @⁠AliasFor for an
attribute other than @⁠Component's 'value' attribute, the value is
still used as the @⁠Component name based on convention. As of Spring
Framework 7.0, such a 'value' attribute will no longer be used as the
@⁠Component name.

See gh-34346
Closes gh-34317
2025-02-10 13:29:40 +01:00
Sam Brannen 2fcae65853 Polishing 2025-02-10 13:29:33 +01:00
rstoyanchev 7a0fe7d14f WebAsyncManager wraps disconnected client errors
If the Servlet container delegates a disconnected client error via
AsyncListener#onError, wrap it as AsyncRequestNotUsableException
for more targeted and consistent handling of such errors.

Closes gh-34363
2025-02-10 11:14:21 +00:00
rstoyanchev ccdaed594e Polishing contribution
Closes gh-34333
2025-02-10 11:14:21 +00:00
Branden Clark c41b0140cd Check hasNext on sessionIds in UserDestinationResult
See gh-34333

Signed-off-by: Branden Clark <brandenrayclark@gmail.com>
2025-02-10 11:14:21 +00:00
rstoyanchev ceffda7874 Polishing contribution
Closes gh-34362
2025-02-10 11:14:21 +00:00
Jared Wiltshire 49f9b40fba Support RFC 8441 upgrades over HTTP/2 CONNECT
See gh-34362

Signed-off-by: Jared Wiltshire <jazdw@users.noreply.github.com>
2025-02-10 11:14:21 +00:00
Sam Brannen d59991fcc9 Revise contribution
See gh-34006
2025-02-10 11:42:24 +01:00
Yanming Zhou cf46f391d7 Improve diagnostics when a Bean Override cannot be selected by type
See gh-34004
Closes gh-34006

Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
2025-02-10 11:06:10 +01:00
Andras Dobrosi 2b4c7d09b0 Match ContentDisposition attributes case-insensitively
This commit ensures that `ContentDisposition` parses attributes like
"filename" and "filename*" in a case insensitive fashion, per RFC 6266.

Closes gh-34383

Signed-off-by: Andras Dobrosi <dobrosi@gmail.com>
[brian.clozel@broadcom.com: apply code conventions]
Signed-off-by: Brian Clozel <brian.clozel@broadcom.com>
2025-02-10 09:21:02 +01:00
Johnny Lim 61138698c6 Fix copyright end year in ServerResponseResultHandler
See 1cea1fe962 (diff-fa20069f0305b5aee07bf90a7f8d0502a6ee139892639b7dfe470b54c3a8574aL2-R2)

See gh-34066
Closes gh-34391

Signed-off-by: Johnny Lim <izeye@naver.com>
2025-02-09 11:38:24 +01:00
Daeho Kwon 3548e872b9 Fix deprecation warnings in RuntimeHintsAgentPlugin
Closes gh-34390

Signed-off-by: Daeho Kwon <trewq231@naver.com>
2025-02-08 16:19:26 +01:00
Sam Brannen 305686dbf7 Ensure Bean Overrides are discovered once in @⁠Nested hierarchies
Changes made to the Bean Override search algorithms in commit
9181cce65f resulted in a regression that caused tests to start failing
due to duplicate BeanOverrideHandlers under the following circumstances.

- An enclosing class (typically a top-level test class) declares a
  @⁠BeanOverride such as @⁠MockitoBean.

- An inner class is declared in that enclosing class.

- A @⁠Nested test class which extends that inner class is declared in
  the same enclosing class.

The reason for the duplicate detection is that the current search
algorithm visits the common enclosing class twice.

To address that, this commit revises the search algorithm in
BeanOverrideHandler so that enclosing classes are only visited once.

See gh-33925
Closes gh-34324
2025-02-08 13:30:22 +01:00
Juergen Hoeller ace2f0a3e5 Expose resolveAutowireCandidates method with basic candidate filtering
DependencyObjectProvider is aligned to check basic autowire-candidate status even in case of custom filtering.

Closes gh-34203
2025-02-07 19:00:25 +01:00
Juergen Hoeller 1a573d6e3c Lazily retrieve TypeDescriptor annotations on demand
Closes gh-33948
2025-02-07 18:55:24 +01:00
Sam Brannen bb7a8006c5 Fix @⁠Nullable declaration in DataBinder on 6.2.x 2025-02-07 18:33:03 +01:00