Commit Graph
35251 Commits
Author SHA1 Message Date
rstoyanchev ffcf37468f Update documentation on forwarded headers
See gh-37072
2026-07-24 22:31:52 +03:00
Brian Clozel e24f5f2ca7 Merge branch '7.0.x' 2026-07-24 15:15:52 +02:00
Brian Clozel b5de644cbb Do not deploy org.springframework:framework-docs on Central
Fixes gh-36879
2026-07-24 15:15:22 +02:00
Brian Clozel 079992021c Improve MimeType parser for RFC compliance
Prior to this commit, the `MimeType` class would compare raw parameter
values for the equals/hashcode contract. This went against the RFC which
states that quoted and unquoted parameter values are equivalent.

This commit rewrote the entire `MimeType` parser in `MimeTypeUtils`
as a state parser to improve robustness and performance.
The `MimeType` equals, compareTo and hascode contracts now unquote
parameter values before comparing them.

This change also optimizes the `tokenize` function that splits many
comma-separated MIME types into a list. Now that this method isn't used
anywhere else, it is also deprecated as of 7.1. This method was
initially made public to be reused within Spring Framework and has no
particular use in Spring applications in general.

Finally, this also makes `MediaType` and `MimeType` leverage the
`MimeType` LRU cache as much as possible, including when parsing
`Accept:` HTTP headers.

Closes gh-36729
2026-07-24 14:29:36 +02:00
rstoyanchev 9bdeadcfbd Deprecate historic forwarded header behavior
See gh-37072
2026-07-23 12:15:24 +03:00
rstoyanchev 31c37d4f2c Require choice between Forwarded and X-Forwarded headers
This commit introduces a constructor argument to select whether
to use the standard "Forwarded" header or the "X-Forwarded-*"
alternative headers. A separate property enables support for
X-Forwarded-Prefix.

Closes gh-37072
2026-07-23 12:15:24 +03:00
rstoyanchev 68862530fb Parse the standard "Forwarded" header directly
This commit introduces manual parsing of the standard "Forwarded"
header instead of using regular expressions.

Closes gh-36964
2026-07-23 12:15:24 +03:00
rstoyanchev 7b71df72e5 Add ForwardedInfo to ForwardedHeaderUtils
This commit adds two new methods in ForwardedHeaderUtils, one to parse
the standard "Forwarded" header only, and another to parse the
"X-Forwarded-*" alternative headers. As those are single parse methods,
a ForwardedInfo container type is necessary to return the results.

See gh-36964
2026-07-23 12:15:24 +03:00
Brian Clozel 224522244f Merge branch '7.0.x' 2026-07-22 10:54:58 +02:00
Brian Clozel 7de2b24d81 Fix primitive array annotation attributes on Java 24 class reading
Prior to this commit, `ClassFileAnnotationDelegate#parseArrayValue`
would only consider `int[]`, `double[]` and `long[]` array
annotation attributes; other primitive array types like `byte[]`
would use a generic path that would use boxed types.

This commit ensures that a comprehensive pass is made for all
primitive typed arrays. Because the `AnnotationValue` hierarchy
is sealed, we can now maje sure that the implementation is
exhaustive.

Closes gh-37083
2026-07-22 10:50:07 +02:00
Tran Ngoc Nhan 1502ab0b20 Correct HandlerMethodValidationExceptionTests package
Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
2026-07-21 15:54:53 +03:00
Sam Brannen 304f8eb27e Merge branch '7.0.x' 2026-07-21 12:00:08 +03:00
Sam Brannen b90624472e Polish Javadoc for ProtobufDecoder 2026-07-21 11:57:20 +03:00
BAE JAE HYEON 1600e2479b Fix Javadoc in ProtobufDecoder's MessageSizeReader API
Previously, the @⁠return tag in MessageSizeReader.readMessageSize() was
followed by a redundant "return", which rendered as "Returns: return
the message size..." in the published API documentation.

Closes gh-37079

Signed-off-by: BAE JAE HYEON <roblery128@gmail.com>
2026-07-21 11:53:24 +03:00
Sébastien Deleuze 3dfb4ef754 Upgrade Kotlin Coroutines to 1.11.0
Closes gh-37076
2026-07-20 15:30:59 +02:00
Sébastien Deleuze 08a4844288 Upgrade Kotlin to 2.4.10
Closes gh-37074
2026-07-20 15:30:58 +02:00
Sam Brannen 38e1bf5970 Merge branch '7.0.x' 2026-07-20 11:07:00 +03:00
Manu Sridharan 233725c8f5 Add @⁠Nullable annotations when treating Map.remove() as returning @⁠Nullable
Closes gh-37067

Signed-off-by: Manu Sridharan <msridhar@gmail.com>
2026-07-20 11:02:55 +03:00
Brian Clozel 5ac20a8104 Reinstate invalid resource location checks
This checks was removed previously because the location was considered
as invalid in #36695, but they were later reinstated in #36692.

This commit also reinstates the check that prevents static resource
resolution in those locations.

Closes gh-37063
2026-07-17 13:41:38 +02:00
Brian Clozel 12d71c9a9b Merge branch '7.0.x' 2026-07-16 19:21:35 +02:00
Brian Clozel 8fb2f72282 Use ASCII chars in Content-Disposition filename parameter
Prior to this commit, gh-36328 avoided using RFC 2047 encoding for the
"filename" parameter and use ISO-8859-1 only. This change unfortunately
caused issues because some implementations might try and detect the
encoding automatically.

This commit restricts the filename parameter to ASCII encoding only by:
* transliterating characters to the closes ASCII character
("é"->"e", "ä"->"ae"...)
* falling back to "_" for other chacacters with non latin alphabet or
  emojis

Closes gh-37062
2026-07-16 19:21:16 +02:00
Brian Clozel 0791d9a6e3 Merge branch '7.0.x' 2026-07-16 19:10:36 +02:00
samlightfoot a2feb9ffe6 Release Jackson BufferRecycler to its pool in encoders
Both encoders acquire a pooled BufferRecycler via
factory._getBufferRecycler() but never return it. Jackson 3 changed the
default pool from a ThreadLocal to a per-factory ConcurrentDequePool that
only refills on an explicit releaseToPool(), so the gap leaves the pool
empty and every encode allocates a fresh recycler and buffers.

Hold the recycler in a local and release it once the generator and byte
builder are done: in encodeValue's finally, and in the streaming path's
doAfterTerminate after generator.close() and byteBuilder.release().
releaseToPool() is idempotent, so sharing the recycler with the generator
cannot double-release.

Closes gh-37059

Signed-off-by: samlightfoot <samueldlightfoot@gmail.com>
2026-07-16 19:00:14 +02:00
Sébastien Deleuze 734c7ed4a7 Merge branch '7.0.x' 2026-07-16 17:32:26 +02:00
Dmitry Sulman 27aa9e46c5 Add awaitEntityWithRetry extension to WebClient.ResponseSpec
See #36771
Closes #36808

Signed-off-by: Dmitry Sulman <dmitry.sulman@gmail.com>
2026-07-16 17:25:29 +02:00
Juergen Hoeller 40f7d56ed4 Register original bean name as alias if not taken already
Closes gh-37038
2026-07-16 10:45:16 +02:00
Juergen Hoeller c4c0a84f83 Merge branch '7.0.x' 2026-07-16 10:20:53 +02:00
Juergen Hoeller 56d706d591 Skip concurrency limit tests when common pool parallelism is too low 2026-07-16 10:17:29 +02:00
Sam Brannen 99b991b6f3 Upgrade to JUnit 6.1.2
Closes gh-36815
2026-07-13 10:16:37 +02:00
Brian Clozel 9024d5ffbd Merge branch '7.0.x' 2026-07-12 11:55:38 +02:00
junhyeong9812 bbfe6a0473 Make immediate-cancel task termination test deterministic
The taskTerminationTimeoutWithImmediateCancel test submitted a task and
immediately closed the executor, then asserted that the future was
cancelled. The cancellation flag is set by close() on the calling thread,
while it is checked at the start of the task on a separate worker thread.
With no ordering guarantee between the two, a quickly scheduled worker
could pass the cancellation check before close() set the flag, complete
the trivial task normally, and leave the future uncancelled, making the
test fail intermittently under load.

Override doExecute to capture the task-tracking wrapper instead of
running it on a background thread, then run it on the test thread after
close() has set the cancellation flag. This exercises the same
cancellation path deterministically, with no reliance on thread
scheduling.

Signed-off-by: junhyeong9812 <pickjog@gmail.com>
2026-07-10 20:30:19 +02:00
Sébastien Deleuze 6dd2aa3988 Merge branch '7.0.x' 2026-07-08 20:46:34 +02:00
Sébastien Deleuze 13a43e76cb Fix Javadoc error in RetryPolicy
See gh-36983
2026-07-08 20:46:17 +02:00
Sébastien Deleuze 28bf619887 Merge branch '7.0.x' 2026-07-08 17:23:42 +02:00
Sébastien Deleuze 16e82cd693 Refine JdbcTemplate nullability contribution
Closes gh-37012
2026-07-08 16:52:17 +02:00
Chris 516a2ca511 Make batchArgs contents nullable in batchUpdate
Updated batchUpdate method signatures to allow nullable Object arrays.

See gh-37012

Signed-off-by: Chris <christian@vonrueti.ch>
2026-07-08 15:26:55 +02:00
Yanming Zhou 9726c7ed5f Let composite/filtered collections accept null elements
Closes gh-36923

Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
2026-07-08 15:17:17 +02:00
Sébastien Deleuze 7e0818f4e9 Align domainToAscii with current WhatWG spec
The WhatWG URL Standard changed its "domain to ASCII" algorithm when
beStrict is false and the domain is an ASCII string, it now returns
the domain lowercased regardless of Unicode ToASCII's outcome, for web
compatibility. Invalid or ambiguous "xn--" (ACE) labels are no longer
rejected or validated; they are lowercased and accepted, matching
browsers and the web-platform-tests URL cases.

This supersedes the earlier spec revision that only lowercased ASCII
domains whose labels did not start with "xn--". Drop the now-obsolete
"xn--" label detection (which was dead code anyway due to a typo) and
unconditionally lowercase ASCII domains.

Closes gh-37018
2026-07-08 15:11:42 +02:00
Sébastien Deleuze ed13afa0d4 Ensure consistent ButtonTag value attribute processing
Closes gh-37017
2026-07-08 15:08:51 +02:00
Sam Brannen 1700fad16d Update due to deprecation warnings 2026-07-06 15:01:43 +02:00
Sam Brannen d71643c347 Remove unused code 2026-07-06 14:55:47 +02:00
Juergen Hoeller 257687d44b Upgrade to Aalto 1.4, Gson 2.14, Woodstox 7.2.1 2026-07-06 12:52:52 +02:00
Juergen Hoeller 9a82d107c0 Merge branch '7.0.x'
# Conflicts:
#	framework-platform/framework-platform.gradle
2026-07-06 12:32:43 +02:00
Juergen Hoeller c08e5e9c1c Upgrade to Log4J 2.26.1, Groovy 5.0.7, Tomcat 11.0.23, Jetty 12.1.10, EclipseLink 5.0.1, Hibernate ORM 7.2.22, Hibernate Validator 9.1.2, Caffeine 3.2.4, Protobuf 4.35.1, Checkstyle 13.7 2026-07-06 12:30:41 +02:00
Juergen Hoeller 97e9ddb2d7 Add constant for default timeout value
Closes gh-36983
2026-07-06 11:57:27 +02:00
Sam Brannen 45b4d00d9f Merge branch '7.0.x' 2026-07-06 11:03:12 +02:00
Sam Brannen f0e69a702c Ensure SpEL's InlineList is immutable in compiled mode
Prior to this commit, SpEL's InlineList was cached as a mutable list in
compiled mode (i.e., in a static field in the generated byte code).

To address that, this commit modifies InlineList's generateClinitCode()
method so that it wraps both top-level and nested inline lists using
Collections.unmodifiableList(), analogous to what we already do in
createList().

Closes gh-37001
2026-07-06 10:52:54 +02:00
Sam Brannen 4bcb6cc081 Merge branch '7.0.x' 2026-07-02 12:08:26 +02:00
junhyeong9812 d1470bbb25 Register native configuration file when only lambda hints are present
Prior to this commit, FileNativeConfigurationWriter did not write reachability-metadata.json
when a RuntimeHints instance contained only lambda hints, because
NativeConfigurationWriter.hasAnyHint() omitted
ReflectionHints.lambdaHints() from its checks. As a result, lambda
metadata emitted by RuntimeHintsWriter was silently dropped.

This commit addresses that by including lambda hints in hasAnyHint() so
the configuration file is written whenever lambda hints are present.

Closes gh-36989

Signed-off-by: junhyeong9812 <pickjog@gmail.com>
2026-07-02 12:06:24 +02:00
Sébastien Deleuze df0ec74107 Merge branch '7.0.x' 2026-07-01 15:41:32 +02:00