Commit Graph

31788 Commits

Author SHA1 Message Date
Brian Clozel
65f118bdec Merge branch '6.1.x' 2024-04-29 13:40:51 +02:00
Brian Clozel
370a4ee8b3 Upgrade to gradle-enterprise-conventions 0.0.17
Closes gh-32724
2024-04-29 13:15:05 +02:00
Sam Brannen
fc3dddac9c Polishing 2024-04-28 11:43:14 +03:00
donghui
a662f5e719 Add a requiredBody() extension to RestClient.ResponseSpec
Closes gh-32703
2024-04-26 16:21:32 +02:00
Sam Brannen
3002813598 Clean up warnings in spring-test 2024-04-26 15:49:09 +03:00
Arjen Poutsma
3cfa4ed4f7 Various UrlParser improvements
See gh-32513
2024-04-26 11:44:32 +02:00
Sam Brannen
27d2200058 Introduce CompilableIndexAccessor SPI in SpEL
This commit introduces a new CompilableIndexAccessor SPI for the Spring
Expression Language (SpEL) which allows an IndexAccessor to support
compilation to bytecode for operations that read an index.

This analogous to the CompilablePropertyAccessor SPI.

This commit also includes a prototype for a general purpose
ReflectiveIndexAccessor in the tests.

Closes gh-32613
2024-04-26 12:19:10 +03:00
Sam Brannen
0b5800ae39 Introduce generateCodeForArgument() in CodeFlow
Closes gh-32708
2024-04-25 15:12:21 +03:00
Sam Brannen
25fd5659cb Polishing 2024-04-25 15:10:00 +03:00
Sam Brannen
de9ce800bf Polishing 2024-04-25 14:00:35 +03:00
Sam Brannen
8f579b3144 Make SpelNode compilation aware
In order to make SpelNode compilation aware, this method moves the
declaration of isCompilable() and generateCode(...) from SpelNodeImpl
to SpelNode.

Closes gh-32707
2024-04-25 13:47:57 +03:00
Sam Brannen
14689256c4 Support String index type in custom IndexAccessor
Closes gh-32706
2024-04-25 12:17:13 +03:00
Sam Brannen
a3d3bc0a1f Polishing 2024-04-25 12:14:23 +03:00
Sam Brannen
a986374da7 Use records to track cached state in Indexer 2024-04-25 11:51:11 +03:00
Simon Baslé
4e6325a277 Merge branch '6.1.x' 2024-04-25 10:09:23 +02:00
Simon Baslé
55361fa4f6 Release RSocket setup payload when it is not handled
This commit counterbalances the retain in the MessagingRSocket
handleConnectionSetupPayload method with a conditional release on SETUP
frame type in handleNoMatch, preventing Netty buffer leaks.

Closes gh-32424
2024-04-25 10:09:05 +02:00
Sam Brannen
aaf33100d9 Add IndexAccessor support to SpEL's SimpleEvaluationContext
Closes gh-32702
2024-04-24 16:19:39 +03:00
Sam Brannen
1e4275a0f9 Implement optional get<list>() methods in EvaluationContext as default methods 2024-04-24 15:54:05 +03:00
Sam Brannen
33fbd7141d Make AstUtils package-private
AstUtils was never intended to be a public utility class.
2024-04-24 15:44:02 +03:00
Sam Brannen
461d7a82f6 Avoid redefining getSpecificTargetClasses() in [Property|Index]Accessor 2024-04-24 15:39:01 +03:00
Sam Brannen
00da781c44 Merge branch '6.1.x' 2024-04-24 15:33:19 +03:00
Sam Brannen
546ca9b834 Polishing 2024-04-24 15:32:57 +03:00
Juergen Hoeller
0402ea13c0 Merge branch '6.1.x' 2024-04-24 13:42:43 +02:00
Juergen Hoeller
09b476ac18 Polishing 2024-04-24 13:42:02 +02:00
Juergen Hoeller
387e34d881 Wrap depends-on exception for specifically requested top-level bean
Closes gh-32470
2024-04-24 13:41:48 +02:00
Stéphane Nicoll
6682d75481 Merge branch '6.1.x' 2024-04-24 11:13:27 +02:00
Stéphane Nicoll
4a10bc3288 Refine preDetermineBeanTypes algorithm
This commit refines the preDetermineBeanTypes algorithm that AOT uses
to approximate the order of preInstantiateSingletons more closely.

Previously, the algorithm assumed that all beans where non-lazy
singletons in terms of initialization order, which led to inconsistent
order in CGLIB proxy generation.

We now explicitly park lazy beans so that their types are determined
during a second phase, matching the order of regular initialization
order.

Closes gh-32669

Co-authored-by: Juergen Hoeller <juergen.hoeller@broadcom.com>
2024-04-24 09:23:51 +02:00
rstoyanchev
75a5409c97 Add PreFlightRequestHandler for Spring MVC
This is equivalent of the same contract for WebFlux. It is implemented
by HandlerMappingIntrospector, and may be called directly by Spring
Security to handle a pre-flight request without delegate to the rest
of the filter chain.

HandlerMappingIntrospector also has the boolean method
allHandlerMappingsUsePathPatternParser that checks whether all handler
mappings are configured to use parsed PathPattern's.

See gh-31823
2024-04-23 19:00:10 +01:00
Juergen Hoeller
3991cae875 Merge branch '6.1.x' 2024-04-23 16:07:46 +02:00
Juergen Hoeller
580adfcbed Polishing 2024-04-23 16:07:09 +02:00
Juergen Hoeller
d151931f86 Skip close lock if acquired by other thread already
Closes gh-32445
2024-04-23 16:06:48 +02:00
Stéphane Nicoll
a77895bd90 Merge branch '6.1.x' 2024-04-23 15:34:49 +02:00
Stéphane Nicoll
16d8d69cf9 Merge pull request #32696 from izeye
* pr/32696:
  Update copyright year of changed files
  Polish

Closes gh-32696
2024-04-23 15:34:44 +02:00
Stéphane Nicoll
95ac0eae4a Update copyright year of changed files
See gh-32696
2024-04-23 15:32:59 +02:00
Johnny Lim
cc73ccefef Polish
See gh-32696
2024-04-23 15:31:48 +02:00
Stéphane Nicoll
ed188f82d8 Merge branch '6.1.x' 2024-04-23 15:25:20 +02:00
Stéphane Nicoll
4d34444a69 Consistent annotation lookup in MvcUriComponentsBuilder
Previously, a UriComponents build based on a method would require the
given method to be the annotated one as method parameter resolution only
applied locally. This was a problem when a controller was specified on
a method whose mapping is defined in a parent.

This commit harmonies the lookup using AnnotatedMethod who provides
support for a synthesized method parameter that takes annotations from
parent parameter into account.

Closes gh-32553
2024-04-23 15:21:27 +02:00
Arjen Poutsma
df41bb1ae9 Merge pull request #32622 from NadChel:bugfix/GH-32620_remove_content_type_if_no_body
* gh-32622:
  Polishing external contribution
  Remove Content-Type when body is empty
2024-04-23 15:04:53 +02:00
Arjen Poutsma
6c5ef9715b Polishing external contribution
See gh-32622
2024-04-23 14:59:28 +02:00
Sergey Zolotaryov
3f8a10c19f Remove Content-Type when body is empty
Closes gh-32622
See gh-32620
2024-04-23 14:58:20 +02:00
Juergen Hoeller
adc7f73170 Merge branch '6.1.x' 2024-04-23 13:17:08 +02:00
Juergen Hoeller
d4ddbd537b Polishing 2024-04-23 13:16:33 +02:00
Juergen Hoeller
0b9b9b4602 Avoid overreading of InputStream in copyRange
Closes gh-32695
2024-04-23 13:16:28 +02:00
Stéphane Nicoll
af4a986256 Merge branch '6.1.x' 2024-04-23 12:43:40 +02:00
Stéphane Nicoll
40596d444c Provide a more explicit link to URI composition examples
Closes gh-32685
2024-04-23 12:43:15 +02:00
Stéphane Nicoll
4e1b8f9be3 Merge branch '6.1.x' 2024-04-23 11:04:02 +02:00
Stéphane Nicoll
cb5b9dcaed Document AOT limitation of creating beans with custom arguments
Closes gh-32690
2024-04-23 11:03:28 +02:00
Sam Brannen
ca6d987c56 Support compilation of array and list indexing with Integer in SpEL
Prior to this commit, the Spring Expression Language (SpEL) failed to
compile an expression that indexed into any array or list using an
Integer.

This commit adds support for compilation of such expressions by
ensuring that an Integer is unboxed into an int in the compiled
bytecode.

Closes gh-32694
2024-04-23 11:36:48 +03:00
Stéphane Nicoll
8124491249 Merge branch '6.1.x' 2024-04-22 17:01:04 +02:00
Stéphane Nicoll
c99e7f8616 Ignore InstanceSupplier for getBean with arguments
Previously, a BeanDefinition that has an instance supplier would be
used irrespective of custom arguments being provided. This commit only
applies the instance supplier if no arguments are provided. With
custom arguments, the regular lookup takes place based on the
information provided in the bean factory.

Closes gh-32657
2024-04-22 16:59:31 +02:00