Commit Graph

31788 Commits

Author SHA1 Message Date
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
Sam Brannen
5830aac1d4 Omit parameter names in REST Clients section of reference docs
For consistency with other examples, this commit omits `method` parameter
names in the "Migrating from RestTemplate to RestClient" section of the
reference docs.

Closes gh-32335
2024-02-28 10:41:50 +01:00
Sam Brannen
0eb61c0f72 Polish REST Clients section 2024-02-28 10:34:57 +01:00
Juergen Hoeller
17b2087198 Introduce background bootstrapping for individual singleton beans
Closes gh-13410
Closes gh-19487
See gh-23501
2024-02-27 22:33:18 +01:00
Sébastien Deleuze
9e7c64270b Merge branch '6.1.x' 2024-02-27 15:52:13 +01:00
Sébastien Deleuze
dc1ef23780 Refine *HttpMessageConverter#getContentLength null safety
Closes gh-32325
2024-02-27 15:51:52 +01:00
Sam Brannen
69dabe9df5 Merge branch '6.1.x' 2024-02-26 18:12:55 +01:00
Sam Brannen
cca440eb8e Do not cache Content-Type in ContentCachingResponseWrapper
Based on feedback from several members of the community, we have
decided to revert the caching of the Content-Type header that was
introduced in ContentCachingResponseWrapper in 375e0e6827.

This commit therefore completely removes Content-Type caching in
ContentCachingResponseWrapper and updates the existing tests
accordingly.

To provide guards against future regressions in this area, this commit
also introduces explicit tests for the 6 ways to set the content length
in ContentCachingResponseWrapper and modifies a test in
ShallowEtagHeaderFilterTests to ensure that a Content-Type header set
directly on ContentCachingResponseWrapper is propagated to the
underlying response even if content caching is disabled for the
ShallowEtagHeaderFilter.

See gh-32039
Closes gh-32317
2024-02-26 17:52:56 +01:00
Sam Brannen
497aa3c069 Polish ShallowEtagHeaderFilterTests 2024-02-26 17:44:48 +01:00
Juergen Hoeller
4d206f79d0 Merge branch '6.1.x'
# Conflicts:
#	spring-jms/src/main/java/org/springframework/jms/listener/DefaultMessageListenerContainer.java
2024-02-26 13:42:00 +01:00
Juergen Hoeller
479879c53a Polishing 2024-02-26 13:40:21 +01:00
Juergen Hoeller
2e57603310 Try type conversion for unique fallback write method as well
Closes gh-32329
See gh-32159
2024-02-26 13:40:05 +01:00
Juergen Hoeller
5c589833d7 Revise idleReceivesPerTaskLimit for surplus tasks on default/simple executor
Closes gh-32260
2024-02-25 19:00:56 +01:00
Juergen Hoeller
9198774f13 Detect wildcard without bounds returned from VariableResolver as well
See gh-32327
See gh-20727
2024-02-25 16:32:11 +01:00
Sam Brannen
430824038e Merge branch '6.1.x' 2024-02-25 16:28:13 +01:00
Sam Brannen
be45481d70 Return unique set from ContentCachingResponseWrapper.getHeaderNames()
Prior to this commit, getHeaderNames() returned duplicates for the
Content-Type and Content-Length headers if they were set in the wrapped
response as well as in ContentCachingResponseWrapper.

This commit fixes that by returning a unique set from getHeaderNames().

In addition, this commit introduces a new test in
ContentCachingResponseWrapperTests to verify the expected behavior for
Content-Type and Content-Length headers that are set in the wrapped
response as well as in ContentCachingResponseWrapper.

See gh-32039
See gh-32317
2024-02-25 16:17:22 +01:00
Juergen Hoeller
260404b7f2 Consistently detect wildcard without bounds as unresolvable
Closes gh-32327
See gh-20727
2024-02-24 20:25:56 +01:00
Juergen Hoeller
567547b63c Skip shortcut resolution for non-standard dependency descriptors
Closes gh-32326
See gh-28122
2024-02-24 18:05:23 +01:00
Sam Brannen
98efa1df5a Merge branch '6.1.x' 2024-02-24 16:42:47 +01:00
Sam Brannen
5680d20637 Honor Content-[Type|Length] headers from wrapped response again
Commit 375e0e6827 introduced a regression in
ContentCachingResponseWrapper (CCRW). Specifically, CCRW no longer
honors Content-Type and Content-Length headers that have been set on
the wrapped response and returns null for those header values if they
have not been set directly on the CCRW.

This commit fixes this regression as follows.

- The Content-Type and Content-Length headers set in the wrapped
  response are honored in getContentType(), containsHeader(),
  getHeader(), and getHeaders() unless those headers have been set
  directly on the CCRW.

- In copyBodyToResponse(), the Content-Type in the wrapped response is
  only overridden if the Content-Type has been set directly on the CCRW.

See gh-32039
Closes gh-32317
2024-02-24 16:37:22 +01:00
Sam Brannen
8787381892 Polish ContentCachingResponseWrapper[Tests] 2024-02-24 16:37:14 +01:00
Juergen Hoeller
87ea3bd31a Merge branch '6.1.x' 2024-02-24 08:35:10 +01:00
Juergen Hoeller
3cc64968b9 Consistent nullability for internal field access 2024-02-24 08:21:37 +01:00
Sam Brannen
f59c4023e9 Polishing 2024-02-23 14:46:12 +01:00
Juergen Hoeller
58b8330e8d Consistent documentation of defaults and related methods
See gh-32308
2024-02-23 14:41:37 +01:00
Sam Brannen
c2d2e99c2f Polishing 2024-02-23 13:18:09 +01:00
Sam Brannen
eab1a3dc6b Fix BridgeMethodResolverTests.isBridgeMethodFor() in Eclipse IDE 2024-02-23 12:57:14 +01:00
Sam Brannen
4b5e96578d Extract runningInEclipse() into IdeUtils test fixture 2024-02-23 12:57:06 +01:00
Sam Brannen
b0d08fe2d4 Spring cleaning: avoid deprecation warnings 2024-02-23 12:38:40 +01:00