Commit Graph

29744 Commits

Author SHA1 Message Date
Brian Clozel 9910df85cd Remove observation context from ClientRequest
Prior to this commit, gh-31609 added the current observation context as
a request attribute for `WebClient` calls. While it was not confirmed as
the main cause, this feature was linked to several reports of memory
leaks. This would indeed attach more memory to the request object graph
at runtime - although it shouldn't prevent its collection by the GC.

This commit removes this feature and instead developers should get the
current observation from the reactor context if they wish to interact
with it.

Closes gh-32198
2024-03-12 09:49:00 +01:00
Stéphane Nicoll 13679bb906 Reject use of component scan with REGISTER_BEAN condition
This commit introduce a change of behaviour when component scan is used
with conditions. Previously, any condition in the REGISTER_BEAN phase
were ignored and the scan was applied regardless of the outcome of
those conditions. This is because REGISTER_BEAN condition evaluation
happens later in the bean factory preparation.

Rather than ignoring those conditions, this commit fails fast when it
detects such use case. Code will have to be adapted accordingly.

Closes gh-23206
2024-03-12 08:39:53 +01:00
Stéphane Nicoll 6fc1f72704 Merge branch '6.1.x' 2024-03-12 08:21:08 +01:00
Stéphane Nicoll 88b3844d9b Fix default value in ReactorNettyClientRequestFactory#setExchangeTimeout
Closes gh-32419
2024-03-12 08:13:42 +01:00
Sam Brannen 04e69bdb26 Polish contribution
Closes gh-32412
2024-03-11 17:04:53 +01:00
Mikaël Francoeur 3e48031601 Reject null return value from MethodReplacer for primitive return type
This commit throws an exception instead of silently converting a null
return value from a MethodReplacer to a primitive 0/false value.

See gh-32412
2024-03-11 17:04:53 +01:00
Sam Brannen f285971cb3 Polishing 2024-03-11 17:04:53 +01:00
Stéphane Nicoll 89f6e8ec49 Enable test now that the related issue is resolved
See gh-20765
2024-03-11 16:45:30 +01:00
Stéphane Nicoll 53ed15e4a7 Remove disabled test of declined issue
See gh-19689
2024-03-11 16:44:50 +01:00
Brian Clozel 9af4f5cf17 Remove deprecated API in WebContentGenerator
Closes gh-31492
2024-03-11 15:35:12 +01:00
Stéphane Nicoll 92d1ebefbb Upgrade to HtmUnit 3.11.0
This commit upgrades to a major new release of HtmlUnit. This is a
breaking change as HtmlUnit 3 moves to a `org.htmlunit` package and
calling code needs to be restructured.

Our use of Selenium has been adapted accordingly, moving to Selenium
3, using the new org.seleniumhq.selenium:htmlunit3-driver integration.

Closes gh-30392
2024-03-11 14:36:46 +01:00
Sam Brannen 71245f9655 Relocate bean override infrastructure to the proper package in the TCF 2024-03-11 14:21:04 +01:00
Sam Brannen f30a67c9d0 Remove duplicate dependency 2024-03-11 13:59:23 +01:00
Sébastien Deleuze 0435e9c49e Merge branch '6.1.x' 2024-03-11 13:40:23 +01:00
Sébastien Deleuze 80f3be6577 Replace getJvmErasure by getClassifier
Should be slightly faster.

See gh-32334
2024-03-11 13:37:41 +01:00
Sébastien Deleuze 946082f806 Refine publisher type check in CoroutinesUtils
See gh-32390
2024-03-11 13:15:54 +01:00
Sam Brannen 38c831f15f Relocate findPublicDeclaringClass() to CodeFlow
This commit moves findPublicDeclaringClass() from ReflectionHelper to
CodeFlow, since findPublicDeclaringClass() is only used for bytecode
generation and therefore not for reflection-based invocations.
2024-03-11 11:33:52 +01:00
Sam Brannen c4e0f96ef7 Polishing 2024-03-11 11:28:59 +01:00
Sébastien Deleuze 5ee11fb1b3 Polish Yaml support
Closes gh-32345
2024-03-11 09:27:25 +01:00
Hyoungjune 6a8f0d6d7d Add web support for Yaml via Jackson
This commit adds support for application/yaml in MediaType and leverages
jackson-dataformat-yaml in order to support Yaml in RestTemplate,
RestClient and Spring MVC.

See gh-32345
2024-03-11 09:22:51 +01:00
Yanming Zhou 246e4977a2 Polishing Optional usage 2024-03-11 09:13:49 +01:00
Stéphane Nicoll 4e5723ca9e Merge pull request #32411 from quaff
* pr/32411:
  Polish contribution
  Polish Bean Overriding in Tests section of the reference guide

Closes gh-32411
2024-03-11 08:57:57 +01:00
Stéphane Nicoll ffb1caaff4 Polish contribution
See gh-32411
2024-03-11 08:56:59 +01:00
Yanming Zhou 918c5f1f33 Polish Bean Overriding in Tests section of the reference guide
See gh-32411
2024-03-11 08:43:40 +01:00
Sam Brannen b431594021 Make SpEL's OptimalPropertyAccessor private
It was never necessary for SpEL's OptimalPropertyAccessor to be public.

Instead, clients should interact with OptimalPropertyAccessor
exclusively via the CompilablePropertyAccessor API.

In light of that, this commit makes SpEL's OptimalPropertyAccessor
private.

Closes gh-32410
2024-03-10 20:38:19 +01:00
Sam Brannen fc885224f0 Merge branch '6.1.x' 2024-03-10 17:41:49 +01:00
ZeroCyan 78fb378aef Fix order of sections in Validation chapter of reference manual
Closes gh-32408
2024-03-10 17:41:09 +01:00
ZeroCyan 5dc1190930
Fix typo in web documentation
Fixed a small typo.

Closes gh-32407
2024-03-10 16:50:00 +01:00
Sam Brannen 6f5d3a4b12 Polish Bean Override support in the TestContext framework 2024-03-10 16:05:55 +01:00
Sam Brannen 4c246b7c96 Consistently use canonical annotation names in string representations 2024-03-10 15:54:53 +01:00
Sam Brannen 5345a13918 Polish contribution
See gh-32405
2024-03-10 12:36:08 +01:00
Patrick Strawderman 7fa2a28970 Avoid cloning empty Annotation array in TypeDescriptor
Rework AnnotatedElementAdapter to avoid cloning the underlying
Annotation array if it is empty when getAnnotations() is called.

Additionally, make the class static and add a factory method that
returns a singleton instance for null or empty Annotation arrays.

Closes gh-32405
2024-03-10 12:26:49 +01:00
Stéphane Nicoll 8172d7adfe Polish 2024-03-09 17:27:44 +01:00
Sam Brannen 6b64e9992a Merge branch '6.1.x' 2024-03-09 16:31:28 +01:00
Sam Brannen b4e743614e Restore link to Jakarta Servlet issue tracker 2024-03-09 16:30:14 +01:00
Sam Brannen c188f22378 Polishing 2024-03-09 16:08:17 +01:00
Stéphane Nicoll e53ed3e3c6 Merge branch '6.1.x' 2024-03-09 16:03:04 +01:00
Stéphane Nicoll accf7ff645 Merge pull request #32403 from qeeqez
* pr/32403:
  Polish "Fix Javadoc"
  Fix Javadoc

Closes gh-32403
2024-03-09 16:02:51 +01:00
Stéphane Nicoll 4983a802a7 Polish "Fix Javadoc"
See gh-32403
2024-03-09 16:02:01 +01:00
Maksim Sasnouski abdccffa39 Fix Javadoc
This commit fixes various Javadoc issues across the code base.

See gh-32403
2024-03-09 16:02:00 +01:00
Sam Brannen f4c1ad7ae6 Polishing
See gh-29857
2024-03-09 15:38:52 +01:00
Sam Brannen 20be9e150c Polishing 2024-03-09 14:28:01 +01:00
Sam Brannen 65d77624d1 Support SpEL compilation for public methods in private subtypes
Commit c79436f832 ensured that methods are invoked via a public
interface or public superclass when compiling Spring Expression
Language (SpEL) expressions involving method references or property
access (see MethodReference, PropertyOrFieldReference, and
collaborating support classes). However, compilation of expressions
that access properties by indexing into an object by property name is
still not properly supported in all scenarios.

To address those remaining use cases, this commit ensures that methods
are invoked via a public interface or public superclass when accessing
a property by indexing into an object by the property name – for
example, `person['name']` instead of `person.name`.

In addition, SpEL's Indexer now properly relies on the
CompilablePropertyAccessor abstraction instead of hard-coding support
for only OptimalPropertyAccessor. This greatly reduces the complexity
of the Indexer and simultaneously allows the Indexer to potentially
support other CompilablePropertyAccessor implementations.

Closes gh-29857
2024-03-09 14:01:00 +01:00
Sam Brannen 107f47cfcf Add tests for status quo for SpEL compiler 2024-03-09 13:46:39 +01:00
Juergen Hoeller fad544e077 Merge branch '6.1.x'
# Conflicts:
#	spring-core/src/main/java/org/springframework/core/io/support/PathMatchingResourcePatternResolver.java
2024-03-08 19:51:05 +01:00
Juergen Hoeller c1287d48e2 Polishing 2024-03-08 19:31:01 +01:00
Juergen Hoeller 19fec0633f Local root directory and jar caching in PathMatchingResourcePatternResolver
Closes gh-21190
2024-03-08 19:12:14 +01:00
Simon Baslé 729dc0b671 Polishing javadoc 2024-03-08 18:07:51 +01:00
rstoyanchev 38d5c0fed6 Add RFC-7807 response interception
Closes gh-31822
2024-03-08 16:56:38 +00:00
Sam Brannen 3577e3b758 Polish SpEL internals and tests 2024-03-08 17:49:58 +01:00