Commit Graph

29968 Commits

Author SHA1 Message Date
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
Stéphane Nicoll
c21090ad31 Merge branch '6.1.x' 2024-04-22 15:16:50 +02:00
Stéphane Nicoll
8a8c8fe00e Detect target of factory method with AOT
Previously, if a factory method is defined on a parent, the generated
code would blindly use the method's declaring class for both the target
of the generated code, and the signature of the method.

This commit improves the resolution by considering the factory metadata
in the BeanDefinition.

Closes gh-32609
2024-04-22 15:13:56 +02:00
Stéphane Nicoll
9f46dd7d86 Merge branch '6.1.x' 2024-04-22 14:52:31 +02:00
Stéphane Nicoll
f45e7b9b9b Relax scope of DataIntegrityViolationException
This commit updates the Javadoc of DataIntegrityViolationException to
broaden its scope as it was too specific before.

Closes gh-32631
2024-04-22 14:49:17 +02:00
Juergen Hoeller
6a1ec0ed73 Merge branch '6.1.x' 2024-04-22 13:43:57 +02:00
Juergen Hoeller
ec1f5ca600 Polishing 2024-04-22 13:43:07 +02:00
Juergen Hoeller
62efdfb89c Try early initialization for all user-declared methods (including interfaces)
Closes gh-32682
2024-04-22 13:43:02 +02:00
Stéphane Nicoll
b965336467 Merge branch '6.1.x' 2024-04-22 12:13:14 +02:00
Stéphane Nicoll
c3da43291b Upgrade to Java 17.0.11 2024-04-22 12:13:01 +02:00
Brian Clozel
c80bf57834 Merge branch '6.1.x' 2024-04-20 19:46:23 +02:00
Brian Clozel
5aa576f5c6 Register status handler exceptions in observations
Prior to this commit, `RestClientException` thrown by status handlers
would not be registered as observation errors. This commit ensures that
such exceptions are first caught, registered in the observation and
rethrown as expected.

Closes gh-32575
2024-04-20 19:44:11 +02:00
Sam Brannen
80fb8ea813 Avoid unnecessary compilation attempts in SpEL's Indexer
Closes gh-32677
2024-04-19 17:20:24 +02:00
Sam Brannen
1eed71bb1d Polishing 2024-04-19 14:34:09 +02:00
Sam Brannen
c8090fe0b4 Extract generateIndexCode() in SpEL's Indexer 2024-04-19 14:33:22 +02:00
Sam Brannen
9eab7bb11d Introduce null-safe indexing test for custom IndexAccessor 2024-04-19 14:29:43 +02:00
Sam Brannen
a01f7cefae Polish Javadoc for SpelNode 2024-04-19 14:27:11 +02:00
Brian Clozel
ccf9ba86a0 Merge branch '6.1.x' 2024-04-18 21:45:23 +02:00
Brian Clozel
0268180799 Rethrow unhandled JMS listener exceptions
Fixes gh-32666
2024-04-18 21:44:44 +02:00
Brian Clozel
0893cf948d Merge branch '6.1.x' 2024-04-18 21:27:50 +02:00
Brian Clozel
da4547a27e Extend observations to RestClient ResponseSpec
Prior to this commit, the `RestClient` observations would be stopped as
soon as the exchange function was called. This means that all errors
related to response decoding or mapping would not be recorded by the
obsevations.

This commit extends the observation recording to the `ResponseSpec` DSL
calls as well as custom exchange functions.

Fixes gh-32575
2024-04-18 21:26:18 +02:00