Commit Graph

29466 Commits

Author SHA1 Message Date
Juergen Hoeller
3d7ef3ebfc Avoid storage of null marker per method for proxy decision purposes
Includes missing isCandidateClass support on JCacheOperationSource.

Closes gh-20072
2024-03-04 12:55:33 +01:00
Sébastien Deleuze
219004ef13 Merge branch '6.1.x' 2024-03-03 22:26:37 +01:00
Sébastien Deleuze
516a203703 Support nullable Kotlin value class arguments
This commit skips the value class parameter instantiation for nullable
types when a null argument is passed.

Closes gh-32353
2024-03-03 22:26:21 +01:00
rstoyanchev
0758c8b14c Merge branch '6.1.x' 2024-03-03 20:53:36 +00:00
rstoyanchev
877e0b1483 Improve concurrent handling of result in WebAsyncManager
1. Use state transitions
2. Increase synchronized scope in setConcurrentResultAndDispatch

See gh-32340
2024-03-03 20:44:52 +00:00
rstoyanchev
379ffac508 Add state and response wrapping to StandardServletAsyncWebRequest
The wrapped response prevents use after AsyncListener onError or completion
to ensure compliance with Servlet Spec 2.3.3.4.

The wrapped response is applied in RequestMappingHandlerAdapter.

The wrapped response raises AsyncRequestNotUsableException that is now
handled in DefaultHandlerExceptionResolver.

See gh-32340
2024-03-03 20:44:36 +00:00
Sam Brannen
4a6dbb17f4 Merge branch '6.1.x' 2024-03-03 14:51:01 +01:00
Sam Brannen
380184e85a Support SpEL compilation of #root or #this with non-public type
Prior to this commit, if a Spring Expression Language (SpEL) expression
referenced the root context object via the #root or #this variable, we
inserted a checkcast in the generated byte code that cast the object to
its concrete type. However if the root context object's type was
non-public, that resulted in an IllegalAccessError when the compiled
byte code was executed.

VariableReference.getValueInternal() already contains a solution for
global variables which inserts a checkcast to Object in the generated
byte code instead of to the object's concrete non-public type.

This commit therefore applies the same logic to #root (or #this when
used to reference the root context object) that is already applied to
global variables.

Closes gh-32356
2024-03-03 14:49:42 +01:00
Sam Brannen
a29c84f663 Merge branch '6.1.x' 2024-03-02 18:08:27 +01:00
Sam Brannen
5cba32df32 Polish SpEL's VariableReference 2024-03-02 18:03:44 +01:00
Sam Brannen
11c40b5c1c Restructure SpEL indexer compilation tests 2024-03-02 18:03:44 +01:00
Juergen Hoeller
390fe0fe78 Add support for resolving multiple bounds in type variables
Closes gh-22902
See gh-32327
2024-03-02 11:30:17 +01:00
Stéphane Nicoll
ac1a030c35 Make PlaceholderResolutionException extend from IllegalArgumentException
To smooth upgrade from 6.1.x, this commit makes sure that code that used
to catch an IAE to ignore a faulty placeholder resolution still works.

See gh-9628
2024-03-02 08:28:38 +01:00
Sam Brannen
fdbefad59c Improve documentation for SpEL indexing support
Prior to this commit, the reference manual only documented indexing
support for arrays, lists, and maps.

This commit improves the overall documentation for SpEL's property
navigation and indexing support and introduces additional documentation
for indexing into Strings and Objects.

Closes gh-32355
2024-03-01 18:08:29 +01:00
Sébastien Deleuze
bdcd10e228 Merge branch '6.1.x' 2024-03-01 16:53:27 +01:00
Juergen Hoeller
861ef88d9f Expose savepoint callbacks on TransactionSynchronization
Closes gh-30509
2024-03-01 16:48:51 +01:00
Sébastien Deleuze
227e75dae4 Support nullable Kotlin value class arguments
This commit refines WebMVC and WebFlux argument resolution in order to
convert properly Kotlin value class arguments by using the type of the
value instead of the type of the value class.

Closes gh-32353
2024-03-01 16:38:26 +01:00
Sam Brannen
193424c465 Polish "Background Initialization" documentation 2024-03-01 16:14:12 +01:00
Sam Brannen
c76d681dc4 Merge branch '6.1.x' 2024-03-01 14:41:49 +01:00
Sam Brannen
de828e9764 Improve documentation for @⁠Sql execution phases regarding lifecycle
Closes gh-32343
2024-03-01 14:37:31 +01:00
Sébastien Deleuze
4149d5cb2b Merge branch '6.1.x' 2024-03-01 11:55:08 +01:00
Sébastien Deleuze
85a781d517 Instantiate value class parameters with Kotlin reflection
In order to invoke the init block and to improve the maintainability.

Closes gh-32324
2024-03-01 11:50:19 +01:00
Juergen Hoeller
89a10d5c9b Reference documentation for @Bean(bootstrap=BACKGROUND)
See gh-13410
2024-02-29 17:51:31 +01:00
Juergen Hoeller
4ac521607e Reference documentation for @Fallback
See gh-26241
2024-02-29 17:51:12 +01:00
Stéphane Nicoll
57c10a1fac Merge branch '6.1.x' 2024-02-29 17:23:08 +01:00
Stéphane Nicoll
7f916e0ee3 Merge pull request #32349 from qeeqez
* pr/32349:
  Upgrade to com.gradle.enterprise 3.16.2

Closes gh-32349
2024-02-29 17:16:03 +01:00
Maksim Sasnouski
960e885f88 Upgrade to com.gradle.enterprise 3.16.2
See gh-32349
2024-02-29 17:15:26 +01:00
Arjen Poutsma
d81619addd Merge branch '6.1.x' 2024-02-29 15:55:29 +01:00
Arjen Poutsma
bf8f398c19 Merge pull request #32318 from kilink:http-headers-getAcceptLanguageAsLocales-optimization
* gh-32318:
  Polishing external contribution
  Optimize HttpHeaders.getAcceptLanguageAsLocales
2024-02-29 15:54:52 +01:00
Arjen Poutsma
33705516ff Polishing external contribution
See gh-32318
2024-02-29 15:51:29 +01:00
Patrick Strawderman
beb415dfa3 Optimize HttpHeaders.getAcceptLanguageAsLocales
The HttpHeaders.getAcceptLanguageAsLocales was incurring overhead from
using a Stream, as well as calling the fairly expensive
Locale.getDisplayName method.

Switch to using an ArrayList, and skipping over wildcard ranges to avoid
needing to check the display name.

Closes gh-32318
2024-02-29 15:36:55 +01:00
Yanming Zhou
246ebd24bf Add missing method BeanDefinitionBuilder.setFallback() 2024-02-29 13:34:55 +01:00
Yanming Zhou
9a1e5eb8d7 Add test for @Fallback with BeanFactory.getBean(Class) 2024-02-29 13:33:43 +01:00
Juergen Hoeller
4ff0f86ae2 Merge branch '6.1.x' 2024-02-28 21:46:15 +01:00
Juergen Hoeller
d45c0e6b8a Upgrade to Undertow 2.3.12, OpenPDF 1.3.41, JRuby 9.4.6 2024-02-28 21:42:16 +01:00
Juergen Hoeller
154ca54c9f Polishing 2024-02-28 21:40:08 +01:00
Juergen Hoeller
e68487a481 Merge branch '6.1.x' 2024-02-28 19:27:07 +01:00
Juergen Hoeller
f22a1eece4 Polishing 2024-02-28 19:14:37 +01:00
Juergen Hoeller
6d9736acd0 Direct reference to PushBuilder API on Servlet 5.0 baseline
See gh-29435
2024-02-28 19:14:30 +01:00
Juergen Hoeller
cfb29db278 Initial support for Servlet 6.1
Closes gh-31159
2024-02-28 18:54:36 +01:00
Sébastien Deleuze
570c5b34e6 Merge branch '6.1.x' 2024-02-28 18:35:29 +01:00
Sébastien Deleuze
0de3b30029 Provide guidelines for using Kotlin properties with proxies
A typical use case is `@Scope` and its popular `@RequestScope`
specialization.

Closes gh-32287
2024-02-28 18:33:39 +01:00
Juergen Hoeller
fbc265b72b Add DataSource configuration/exposure to LocalEntityManagerFactoryBean
Closes gh-32344
2024-02-28 17:35:46 +01:00
Juergen Hoeller
5acee7b22e Initial support for JPA 3.2
Includes proxy support for Query#getSingleResultOrNull() and EntityManagerFactory#getName() invocations.

Closes gh-31157
2024-02-28 17:35:37 +01:00
Sébastien Deleuze
7c5bcbcba4 Merge branch '6.1.x' 2024-02-28 17:24:08 +01:00
Sébastien Deleuze
45c21042f6 Optimize Kotlin inline class checks
This commit fixes a performance regression caused by gh-31698,
and more specifically by KClass#isValue invocations which are slow since
they load the whole module to find the class to get the descriptor.

After discussing with the Kotlin team, it has been decided that only
checking for the presence of `@JvmInline` annotation is enough for
Spring use case.

As a consequence, this commit introduces a new
KotlinDetector#isInlineClass method that performs such check, and
BeanUtils, CoroutinesUtils and WebMVC/WebFlux InvocableHandlerMethod
have been refined to leverage it.

Closes gh-32334
2024-02-28 17:18:57 +01:00
Juergen Hoeller
3477738bed Consistently pick lowest superclass level to replace
See gh-28676
2024-02-28 15:49:05 +01:00
Juergen Hoeller
fa5d246a1b Replace all exposed superclasses in final step after traversal
See gh-28676
2024-02-28 15:39:53 +01:00
Juergen Hoeller
aeb77cf4e1 Restore correct threadWithLock check without isInfoEnabled()
See gh-23501
2024-02-28 11:47:39 +01:00
Sam Brannen
18dc7d73d6 Merge branch '6.1.x' 2024-02-28 10:42:31 +01:00