Commit Graph

30053 Commits

Author SHA1 Message Date
Brian Clozel
fd68ea6fcb Encode non-printable character in Content-Disposition parameter
Prior to this commit, the "filename" parameter value for the
"Content-Disposition" header would contain non-printable characters,
causing parsing issues for HTTP clients.
This commit ensures that all non-printable characters are encoded.

Fixes gh-35035
2025-06-12 08:39:41 +02:00
Juergen Hoeller
28caa39020 Upgrade to Reactor 2023.0.19
Includes SLF4J 2.0.17, Groovy 4.0.27, FreeMarker 2.3.34

Closes gh-35022
2025-06-11 12:54:02 +02:00
Sam Brannen
8ecc553696 Polish contribution
See gh-35013
See gh-35018

(cherry picked from commit 4d2cc4ae97)
2025-06-10 12:39:48 +02:00
Mohammad Saeed Nouri
cd44efaf68 Allow update of existing WebSession after max sessions limit is reached
Previously, when saving a WebSession, the system did not check whether
the session ID already existed. As a result, even if the session being
saved was an update to an existing one, it was incorrectly treated as a
new session, and a "maximum sessions exceeded" error was triggered.

This fix ensures that if a WebSession with the same ID already exists,
it will be updated rather than counted as a new session, thereby
preventing unnecessary session limit violations.

See gh-35013
Closes gh-35018

Signed-off-by: Mohammad Saeed Nouri <msnsaeed71@gmail.com>
(cherry picked from commit c04902fefb)
2025-06-10 12:38:58 +02:00
Sam Brannen
59d2895c82 Fix InMemoryWebSessionStoreTests.startsSessionImplicitly() test
(cherry picked from commit 3c265e1044)
2025-06-10 12:37:45 +02:00
Sam Brannen
a876bb41af Polish WebSession support and tests
(cherry picked from commit 222702f750)
2025-06-10 12:37:19 +02:00
Juergen Hoeller
3b6becac01 Check for package-visible constructor in case of ClassLoader mismatch
Closes gh-34950

(cherry picked from commit 15d1455acb)
2025-05-27 10:30:07 +02:00
Sam Brannen
59ffbd7a59 Test conversion support in PropertySourcesPlaceholderConfigurer
This commit introduces a "regression test" which demonstrates that
PropertySourcesPlaceholderConfigurer uses the ConversionService from
the Environment.

See gh-34936
2025-05-26 18:09:51 +02:00
Sam Brannen
c0a9da65f4 Support only Object property values in MockEnvironment test fixture
The setProperty() and withProperty() methods in MockEnvironment were
originally introduced with (String, String) signatures; however, they
should have always had (String, Object) signatures in order to comply
with the MockPropertySource and PropertySource APIs.

To address that, this commit changes the signatures of these methods so
that they only accept Object values for properties.

NOTE: this commit only affects the internal MockEnvironment used as a
test fixture. This commit does not affect the official, public
MockEnvironment implementation in spring-test.

See gh-34947
See gh-34948

(cherry picked from commit d78264756e)
2025-05-26 17:58:15 +02:00
Sam Brannen
30bee4db0f Polish Javadoc for MockPropertySource
(cherry picked from commit 6a6abac003)
2025-05-26 17:54:52 +02:00
Brian Clozel
9a89654a64 Next development version (v6.1.21-SNAPSHOT) 2025-05-15 10:32:10 +02:00
rstoyanchev
edfcc6ffb1 Make use of PatternMatchUtils ignoreCase option
Closes gh-34801
2025-05-14 15:49:06 +01:00
rstoyanchev
f93132b11e Add missing @since tags in PatternMatchUtils
See: gh-34801
2025-05-14 15:17:56 +01:00
Juergen Hoeller
6ab4c84bd5 Upgrade to Reactor 2023.0.18
Closes gh-34899
2025-05-14 15:25:15 +02:00
Juergen Hoeller
d5fca0d2c5 Upgrade to Jetty 12.0.21, Netty 4.1.121, Apache HttpClient 5.4.4, Checkstyle 10.23.1 2025-05-13 16:57:19 +02:00
Juergen Hoeller
cbb94193fe Clarify CompositePropertySource behavior for EnumerablePropertySource contract
Closes gh-34886

(cherry picked from commit 6a9444473f)
2025-05-13 16:57:06 +02:00
Brian Clozel
5b5e2b6876 Fix HttpClient 5.3.x request config compatibility
As of gh-33806, the HttpComponents client request factory is forward
compatible with the 5.4+ versions of that library for configuring HTTP
request configuration.

This change would not tkae into account configuration set at the Spring
level because it would consider the default `RequestConfig` instance as
a custom one. This commit ensures that Spring sets its own configuration
if no custom configuration was set for all supported HttpComponents
generations.

Fixes gh-34854
2025-05-05 14:50:46 +02:00
Juergen Hoeller
a5b0399a1d Polishing
(cherry picked from commit d0b186a1c7)
2025-04-28 16:20:29 +02:00
Juergen Hoeller
71f2725638 Try loadClass on LinkageError in case of same ClassLoader as well
Closes gh-34824

(cherry picked from commit 4172581f1b)
2025-04-28 16:20:24 +02:00
Sam Brannen
daee9f1242 Reinstate the @⁠Inject Technology Compatibility Kit (TCK)
In commit 05ebca8677, the `public` modifier was removed from the
SpringAtInjectTckTests class, which prevents it from being run as a
JUnit 3 test class.

To address that, this commit adds the missing `public` modifier as well
as a a code comment to help prevent this from happening again.

In addition, this commit updates spring-context.gradle to ensure that
the JUnit Vintage test engine is always applied. However, that Gradle
configuration is unfortunately ignored due to how our TestConventions
class has been implemented. Thus, that issue will have to be addressed
separately.

Closes gh-34800

(cherry picked from commit e384389790)
2025-04-25 12:37:58 +02:00
rstoyanchev
89ae20b9ff Add ignoreCase variants to PatternMatchUtils
See gh-34801
2025-04-23 12:13:49 +01:00
Brian Clozel
a5a7d63dab Next development version (v6.1.20-SNAPSHOT) 2025-04-17 09:05:28 +02:00
Stéphane Nicoll
d879112885 Upgrade to github-changelog-generator 0.0.12
Closes gh-34756
2025-04-15 10:06:17 +02:00
Juergen Hoeller
0a71df7aee Polishing 2025-04-10 18:55:34 +02:00
Juergen Hoeller
82b7fcb2cc Try loadClass on LinkageError in case of ClassLoader mismatch
See gh-34677

(cherry picked from commit 7f2c1f447f)
2025-04-10 18:49:31 +02:00
Juergen Hoeller
6717fca4ec Explicitly use original ClassLoader in case of package visibility
Closes gh-34684

(cherry picked from commit 6bb964e2d0)
2025-04-02 23:50:39 +02:00
Juergen Hoeller
86ea7003f7 Upgrade to Groovy 4.0.26, Jetty 12.0.18, Apache HttpClient 5.4.3, Checkstyle 10.22 2025-04-01 23:42:56 +02:00
Juergen Hoeller
0a157faec1 Polishing (backported from 6.2.x) 2025-04-01 22:36:40 +02:00
Juergen Hoeller
2548d44f3b Include cause in MethodInvocationException message
Closes gh-34691

(cherry picked from commit 203ca30a64)
2025-04-01 22:28:39 +02:00
Juergen Hoeller
6cc6ea1b2b Make jar caching configurable through setUseCaches
Closes gh-34694
2025-03-31 17:24:33 +02:00
Juergen Hoeller
b73ca60811 Only attempt load for CGLIB classes in AOT mode
Closes gh-34677

(cherry picked from commit 743f32675d)
2025-03-31 17:23:46 +02:00
Sam Brannen
d689629036 Support abstract @⁠Configuration classes without @⁠Bean methods again
Historically, @⁠Configuration classes that did not declare @⁠Bean
methods were allowed to be abstract. However, the changes made in
76a6b9ea79 introduced a regression that prevents such classes from
being abstract, resulting in a BeanInstantiationException. This change
in behavior is caused by the fact that such a @⁠Configuration class is
no longer replaced by a concrete subclass created dynamically by CGLIB.

This commit restores support for abstract @⁠Configuration classes
without @⁠Bean methods by modifying the "no enhancement required" check
in ConfigurationClassParser.

See gh-34486
Closes gh-34663

(cherry picked from commit 044258f085)
2025-03-31 14:33:02 +02:00
rstoyanchev
077721bdb4 Remove outdated notes on forwarded headers.
Closes gh-34625
2025-03-31 11:38:51 +01:00
Stéphane Nicoll
b7654dd984 Make sure the generated values are available from a static context
This commit updates the tests of property values code generated to
invoke the generated code from a `static` context. This ensures that
the test fails if that's not the case.

This commit also updated LinkedHashMap handling that did suffer from
that problem.

Closes gh-34661
2025-03-27 12:09:29 +01:00
Juergen Hoeller
4645ce60c8 Polishing 2025-03-25 19:27:37 +01:00
Juergen Hoeller
564d3f6f5e Enable qualifier annotation tests including backported precedence tests
See gh-34644
2025-03-25 00:24:23 +01:00
Juergen Hoeller
7a1dfe79a0 Polishing (aligned with 6.2.x) 2025-03-21 16:08:02 +01:00
Juergen Hoeller
19257f4fdb Add javadoc notes on potential exception suppression in getBeansOfType
Closes gh-34629

(cherry picked from commit dc41ff569e)
2025-03-21 16:02:01 +01:00
Juergen Hoeller
f06167ea01 Polishing 2025-03-21 11:06:10 +01:00
rstoyanchev
618e003b91 Fix dated Javadoc in MvcUriComponentsBuilder
related to forwarded headers

Closes gh-34615
2025-03-19 12:37:12 +00:00
Juergen Hoeller
8c494e5165 Defer triggerAfterCompletion invocation in doRollbackOnCommitException
Closes gh-34595

(cherry picked from commit cc986cd2e8)
2025-03-19 11:04:51 +01:00
Juergen Hoeller
62d7396769 Suggest compilation with -parameters in case of ambiguity
Closes gh-34609

(cherry picked from commit 86b2617c7f)
2025-03-19 11:04:39 +01:00
Brian Clozel
252058a65a Next development version (v6.1.19-SNAPSHOT) 2025-03-13 09:00:08 +01:00
Juergen Hoeller
9ea049ad6f Upgrade to Reactor 2023.0.16
Includes Netty 4.1.119 and Jetty 12.0.17

Closes gh-34579
2025-03-12 13:28:03 +01:00
Juergen Hoeller
1e31cd685e Avoid getTargetConnection call on transaction-aware Connection close
Closes gh-34484

(cherry picked from commit c64dae3623)
2025-02-28 14:21:55 +01:00
Juergen Hoeller
0d60f266ad Defensively call isShutdown method for executor description
Closes gh-34514

(cherry picked from commit 559ea6c480)
2025-02-28 14:21:41 +01:00
Juergen Hoeller
a018ae6e02 Lenient fallback when cached WeakReference returns null
Closes gh-34423
2025-02-26 10:25:07 +01:00
Juergen Hoeller
ea419d2dcd Avoid unnecessary CGLIB processing on configuration classes
Closes gh-34486

(cherry picked from commit aff9ac72ec)
2025-02-25 18:42:18 +01:00
Brian Clozel
c02d07fdef 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-34491
2025-02-25 17:57:27 +01:00
Juergen Hoeller
7460be617b Consistent default ClassLoader fallback in hint classes
Closes gh-34470
2025-02-23 15:23:51 +01:00