Commit Graph

32332 Commits

Author SHA1 Message Date
Sam Brannen
e9345f16dc Merge branch '6.2.x' 2025-03-03 14:34:06 +01:00
Sam Brannen
30d793cefe Revise deprecation of SqlQuery.rowsExpected
Closes gh-34526
2025-03-03 14:33:19 +01:00
Yanming Zhou
78cc5df748 Deprecate unused "rowsExpected" property of SqlQuery for removal
See gh-34526

Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
2025-03-03 14:33:14 +01:00
Juergen Hoeller
3632c09348 Merge branch '6.2.x' 2025-03-03 13:34:14 +01:00
Juergen Hoeller
5ffaea7a43 Avoid JarURLConnection resource leak in AbstractFileResolvingResource.exists()
Closes gh-34528
2025-03-03 13:32:51 +01:00
Brian Clozel
84a57861d1 Merge branch '6.2.x' 2025-03-03 11:24:09 +01:00
Brian Clozel
1633ad24f3 Ignore nohttp check on buildSrc/build 2025-03-03 11:23:21 +01:00
Rhett CfZhuang
5faf2ed7f4 Fix missing Partitioned cookie support in reactive HTTP clients
This commit adds support for the Partitioned cookie attribute in the
reactive HTTP clients that support this: Reactor and HttpComponents.

Closes gh-34521

Signed-off-by: Rhett CfZhuang <dark.momo985@gmail.com>
[brian.clozel@broadcom.com: rework tests and support HttpComponents]
Signed-off-by: Brian Clozel <brian.clozel@broadcom.com>
2025-03-03 11:23:13 +01:00
Sébastien Deleuze
7bc712e304 Upgrade NullAway to 0.12.4
This commit also slightly refines nullness but without
significant user-side impact expected.

Closes gh-34525
2025-03-03 08:45:54 +01:00
Sébastien Deleuze
f7db4bf4f0 Fix a compilation warning in spring-webflux 2025-03-02 19:15:26 +01:00
Juergen Hoeller
533ecf0244 Merge branch '6.2.x' 2025-03-01 22:21:39 +01:00
Juergen Hoeller
d2733cea36 Notify lenientCreationFinished condition after locked creation as well
Closes gh-34522
2025-03-01 22:20:23 +01:00
Sam Brannen
99d5e90b5e Merge branch '6.2.x' 2025-03-01 13:39:14 +01:00
Johnny Lim
108caea385 Use ORDER constant in MockitoResetTestExecutionListener
See gh-34404
Closes gh-34445

Signed-off-by: Johnny Lim <izeye@naver.com>
2025-03-01 13:35:46 +01:00
rstoyanchev
788b66feac Remove UrlPathHelper in ServletWebSocketHandlerRegistry
See gh-34508
2025-02-28 16:20:38 +00:00
rstoyanchev
6a9783bb1a Merge branch '6.2.x' 2025-02-28 14:41:47 +00:00
rstoyanchev
7e9ac120ac Deprecate UrlPathHelper in ServletWebSocketHandlerRegistry
Closes gh-34508
2025-02-28 14:39:29 +00:00
Juergen Hoeller
b610711235 Merge branch '6.2.x' 2025-02-28 14:15:36 +01:00
Juergen Hoeller
c64dae3623 Avoid getTargetConnection call on transaction-aware Connection close
Closes gh-34484
2025-02-28 14:12:51 +01:00
Juergen Hoeller
559ea6c480 Defensively call isShutdown method for executor description
Closes gh-34514
2025-02-28 14:11:57 +01:00
Sébastien Deleuze
fec0bfe6b3 Merge branch '6.2.x' 2025-02-28 12:06:30 +01:00
Tran Ngoc Nhan
34315fc20f Fix web and webflux reference links
Closes gh-34517
Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
2025-02-28 12:06:11 +01:00
Juergen Hoeller
03cce13937 Merge branch '6.2.x' 2025-02-27 22:54:07 +01:00
Juergen Hoeller
3bb4795d43 Resolve variable bounds at outermost recursion level only
Closes gh-34504
2025-02-27 22:51:41 +01:00
Yanming Zhou
7f020118eb Polish JdbcTemplate to use getter instead of field
1. align with others in the same source file
2. allow subclass to override

Closes: gh-34501
Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
2025-02-27 19:11:14 +01:00
Brian Clozel
72afd4b9bd Merge branch '6.2.x' 2025-02-27 18:58:16 +01:00
Ryan Prayogo
aae2952a32 Replace DefaultKeyGenerator with SimpleKeyGenerator
DefaultKeyGenerator has been deprecated and replaced with SimpleKeyGenerator

Signed-off-by: Ryan Prayogo <57620+ryanprayogo@users.noreply.github.com>
2025-02-27 18:53:10 +01:00
rstoyanchev
33fef8df84 Merge branch '6.2.x' 2025-02-27 14:36:24 +00:00
rstoyanchev
f62251aebd Avoid pathVar-requestParam name collision
Closes gh-34499
2025-02-27 14:34:26 +00:00
rstoyanchev
f92f9c1d5b Fix handling of timeout in SseEmitter
Closes gh-34426
2025-02-27 14:34:26 +00:00
Brian Clozel
8a7d20f844 Upgrade Develocity and Foojay Gradle plugins 2025-02-27 15:02:07 +01:00
Brian Clozel
f55fe79805 Remove Link to Jackson javadoc
The javadoc is not published by the team anymore and we should not link
to an outdated version.
2025-02-27 14:52:18 +01:00
Brian Clozel
68e9460e9b Revisit compiler configuration in project build
This commit revisit the build configuration to enforce the following:

* A single Java toolchain is used consistently with a recent Java
  version (here, Java 23) and language level
* the main source is compiled with the Java 17 "-release" target
* Multi-Release classes are compiled with their respective "-release"
  target. For now, only "spring-core" ships Java 21 variants.

Closes gh-34507
2025-02-27 14:39:43 +01:00
Sam Brannen
382caac37c Merge branch '6.2.x' 2025-02-26 15:45:09 +01:00
Sam Brannen
2b38c00656 Upgrade to Gradle 8.13
Closes gh-34495
2025-02-26 15:26:49 +01:00
Sam Brannen
5f98db6ffe Use new features introduced in JUnit Jupiter 5.11 and 5.12
See gh-34416
2025-02-26 15:18:16 +01:00
Juergen Hoeller
fb77fcd922 Merge branch '6.2.x' 2025-02-26 10:33:19 +01:00
Juergen Hoeller
06721ba6c0 Lenient fallback when cached WeakReference returns null
Closes gh-34423
2025-02-26 10:24:24 +01:00
Brian Clozel
a1410d98de Merge branch '6.2.x' 2025-02-25 17:19:01 +01:00
Brian Clozel
b6a5402d88 Fix multiple Content-Language values in MockHttpServletResponse
Prior to this commit, `MockHttpServletResponse` would only support
adding a `Content-Language` once. Adding multiple header values would
always replace the content-language property in the response and the
entire header value.

This commit ensures that this behavior is supported.

Fixes gh-34488
2025-02-25 17:11:37 +01:00
Juergen Hoeller
dc580740c0 Merge branch '6.2.x' 2025-02-25 16:21:09 +01:00
Juergen Hoeller
aff9ac72ec Avoid unnecessary CGLIB processing on configuration classes
Closes gh-34486
2025-02-25 16:20:12 +01:00
Brian Clozel
466ac6b703 Improve SimpleKey hashing function
Prior to this commit, `SimpleKey` would be used in Spring Framework's
caching support and its `hashCode` value would be used to efficiently
store this key in data structures.

While the current hashcode strategy works, the resulting values don't
spread well enough when input keys are sequential (which is often the
case). This can have negative performance impacts, depending on the
data structures used by the cache implementation.

This commit improves the `hashCode` function with a mixer to better
spread the hash values. This is using the mixer function from the
MurMur3 hash algorithm.

Closes gh-34483
2025-02-25 16:09:01 +01:00
Brian Clozel
8b14bf86ef Merge branch '6.2.x' 2025-02-25 10:48:09 +01:00
Brian Clozel
f895d762cd Remove duplicate Content-Type header in error cases
Prior to this commit, the `DispatcherServlet` would try and reset the
response buffer in case of errors, if the response is not committed
already. This allows for more flexible error handling, even if the
response was being handled already when it errored.

Resetting the response buffer clears the body but leaves HTTP response
headers intact. This is done on purpose as to not clear headers
previously added by Servlet Filters. By leaving in place some headers
like "Content-Type", this does not take into account the fact that the
response body was cleared and that error handling will perform another
round of content negotiation. While this isn't a problem for some
Servlet containers which enforce a single "Content-Type" header value,
this can cause multiple/duplicate values for some others.

This commit ensures that the "Content-Type" response header is removed
at the same time as we clear the "producible media types" attribute:
another pass of content negotiation will be performed for error
handling.

Fixes gh-34366
2025-02-25 10:43:19 +01:00
Brian Clozel
75329e6d9d Revisit MockHttpServletResponse for Servlet 6.1
This commit revisits the behavior of our `MockHttpServletResponse`
implementation with the javadoc clarifications applied in Servlet 6.1.

Prior to this change, adding or setting an HTTP response header with a
`null` name or value would not have the expected behavior:

* a `null` name should have no effect instead of throwing exceptions
* a `null` value when setting a header effectively removes the entry
  from the response headers

Also, this commit ensures that `IllegalStateException` are thrown if
`getWriter` is called after a previous `getOutputStream` (and vice
versa).

Closes gh-34467
2025-02-24 14:02:20 +01:00
Sam Brannen
34129f3f89 Upgrade to JUnit 5.12
Closes gh-34416
2025-02-23 17:38:04 +01:00
Juergen Hoeller
7c4594c014 Merge branch '6.2.x'
# Conflicts:
#	spring-core/src/main/java/org/springframework/aot/hint/ResourceHints.java
#	spring-core/src/main/java/org/springframework/aot/hint/support/FilePatternResourceHintsRegistrar.java
2025-02-23 15:29:38 +01:00
Juergen Hoeller
634d1dd20b Consistent default ClassLoader fallback in hint classes
Closes gh-34470
2025-02-23 15:15:25 +01:00
Juergen Hoeller
1aea698088 Merge branch '6.2.x' 2025-02-23 14:04:31 +01:00