Commit Graph

31827 Commits

Author SHA1 Message Date
Simon Baslé
eb9ee9fafa Polishing
`@since` missing tags in some methods related to the HttpHeaders change
2024-12-27 12:14:23 +01:00
Simon Baslé
f025d60b92 Merge branch '6.2.x' 2024-12-27 11:00:10 +01:00
Simon Baslé
0f38c28e91 Fix ServletRequestDataBinder ctor binding with []-indexed query params
This change ensures that a request containing query parameters in the
array format `someArray[]=value` can be bound into a simple array in
constructors, even for cases where the array values don't have nested
properties.

The value resolver is directly called in the constructor case, before
any mutable properties are considered or even cleared (see
`WebDataBinder#adaptEmptyArrayIndices` method). As a result, we need to
accommodate the possibility that the request stores array elements under
the `name[]` key rather than `name`. This change attempts a secondary
lookup with the `[]` suffix if the type is a list or array, and the key
doesn't include an index.

Closes gh-34121
2024-12-27 10:59:15 +01:00
Simon Baslé
3505c4bcad Ensure DataBinder can bind constructor with a Map with simple values
This change ensures that DataBinder can bind constructor with a Map
parameter that has no nested properties, but just simple values like
a String: `someMap[0]=exampleString`.

Integration tests have been added to cover similar cases that use the
ServletRequestDataBinder.

Closes gh-34043
2024-12-27 10:57:30 +01:00
Stéphane Nicoll
5aab947b6e Merge branch '6.2.x' 2024-12-27 09:33:18 +01:00
Stéphane Nicoll
58670db46e Merge pull request #34165 from brendenehlers
* pr/34165:
  Polish contribution
  Fix grammatical structure in "Basic Concepts"

Closes gh-34165
2024-12-27 09:31:47 +01:00
Stéphane Nicoll
0cdb8a1657 Polish contribution
Using commas render better than em dashes.

See gh-34165
2024-12-27 09:31:34 +01:00
Brenden Ehlers
fe8c70dddb Fix grammatical structure in "Basic Concepts"
See gh-34165
2024-12-27 09:30:43 +01:00
Sébastien Deleuze
6c86914709 Refine null-safety in the spring-webmvc module
Closes gh-34164
2024-12-26 19:23:33 +01:00
Sébastien Deleuze
b332920b17 Refine null-safety in the spring-webflux module
Closes gh-34163
2024-12-26 19:14:04 +01:00
Sébastien Deleuze
5fba926ab6 Refine null-safety in the spring-web module
Closes gh-34162
2024-12-26 18:50:17 +01:00
Sébastien Deleuze
a442c180f1 Refine null-safety in the spring-test module
Closes gh-34161
2024-12-26 17:49:17 +01:00
Sébastien Deleuze
7417bd0ac1 Refine null-safety in the spring-r2dbc module
Closes gh-34160
2024-12-26 16:29:27 +01:00
Sébastien Deleuze
73b24b6f7b Refine null-safety in the spring-orm module
Closes gh-34159
2024-12-26 16:21:17 +01:00
Sébastien Deleuze
abccba22f1 Refine null-safety in the spring-messaging module
Closes gh-34158
2024-12-26 16:00:24 +01:00
Sébastien Deleuze
4fa33dfece Refine null-safety in the spring-aop module
See gh-34154
2024-12-26 15:30:59 +01:00
Sébastien Deleuze
9516d9b822 Refine null-safety in the spring-jms module
Closes gh-34157
2024-12-26 15:18:27 +01:00
Sébastien Deleuze
be11e73d2c Refine null-safety in the spring-expression module
Closes gh-34156
2024-12-26 14:59:50 +01:00
Sébastien Deleuze
4747ab67e6 Refine null-safety in the spring-core module
See gh-34150
2024-12-26 14:56:34 +01:00
Sébastien Deleuze
c245e20e3f Refine null-safety in the spring-beans module
See gh-34152
2024-12-26 14:18:48 +01:00
Sébastien Deleuze
185537d469 Refine jsr305 dependency management
See gh-28797
2024-12-26 14:13:17 +01:00
Sébastien Deleuze
92f1f55957 Refine null-safety in the spring-aop module
Closes gh-34154
2024-12-26 13:53:25 +01:00
Sébastien Deleuze
b4a2cdf028 Merge branch '6.2.x' 2024-12-26 13:18:16 +01:00
Sébastien Deleuze
1ed74efa6b Polishing
Closes gh-34148
2024-12-26 13:16:09 +01:00
Brenden Ehlers
eabd574038 Fix XML code snippet
See gh-34148
2024-12-26 13:15:51 +01:00
Sébastien Deleuze
8b741f3a46 Refine null-safety in the spring-beans module
Closes gh-34152
2024-12-26 11:24:05 +01:00
Sébastien Deleuze
1c37e7092e Use @SuppressWarnings("NullAway.Init")`
This commit uses `@SuppressWarnings("NullAway.Init")` when
relevant.

See gh-34147
See gh-34151
2024-12-26 10:47:10 +01:00
Simon Baslé
f24f9a4ba4 Polishing
Javadoc links to `HttpHeaders#remove` now use the new String-based
signature.

See gh-33913
2024-12-26 10:30:46 +01:00
Stéphane Nicoll
cf49a33ea4 Merge branch '6.2.x' 2024-12-25 09:30:08 +01:00
Stéphane Nicoll
ea386c2398 Merge pull request #34149 from brendenehlers
* pr/34149:
  Fix typo in link

Closes gh-34149
2024-12-25 09:29:52 +01:00
Brenden Ehlers
6c6e8ad831 Fix typo in link
See gh-34149
2024-12-25 09:29:29 +01:00
Sébastien Deleuze
f368147f9d Refine null-safety in the spring-context module
Closes gh-34151
2024-12-24 18:27:13 +01:00
Sébastien Deleuze
cf90beec0a Refine null-safety in the spring-core module
Closes gh-34150
2024-12-24 16:46:00 +01:00
Sébastien Deleuze
fbc759077c Refine null-safety in the spring-jdbc module
Closes gh-34147
2024-12-24 16:17:24 +01:00
Simon Baslé
0c6f5d7d29 HttpHeaders are no longer a MultiValueMap
This change removes the `MultiValueMap` nature of `HttpHeaders`, since
it inherits APIs that do not align well with underlying server
implementations. Notably, methods that allows to iterate over the whole
collection of headers are susceptible to artificially introduced
duplicates when multiple casings are used for a given header, depending
on the underlying implementation.

This change includes a dedicated key set implementation to support
iterator-based removal, and either keeps map method implementations that
are relevant or introduces header-focused methods that have a similar
responsibility (like `hasHeaderValues(String, List)` and
`containsHeaderValue(String, String)`).

In order to nudge users away from using an HttpHeaders as a Map, the
`asSingleValueMap` view is deprecated. In order to offer an escape
hatch to users that do make use of the `MultiValueMap` API, a similar
`asMultiValueMap` view is introduced but is immediately marked as
deprecated.

This change also adds map-like but header-focused assertions to
`HttpHeadersAssert`, since it cannot extend `AbstractMapAssert` anymore.

Closes gh-33913
2024-12-24 14:43:51 +01:00
Sébastien Deleuze
1e0ef99b0c Leverage @NullMarked instead of package configuration
This commit replaces NullAway package configuration by package-level
`@NullMarked` detection by configuring `NullAway:AnnotatedPackages` to
an empty string.

NullAway configuration should be refined to use a proper flag instead
once uber/NullAway#574 is fixed.

See gh-28797
2024-12-23 17:14:29 +01:00
Sébastien Deleuze
528578d138 Merge branch '6.2.x' 2024-12-23 15:34:57 +01:00
Sébastien Deleuze
69b74d7645 Fix NullPointerException in HttpComponentsClientHttpResponse
Closes gh-34132
2024-12-23 15:34:04 +01:00
Stéphane Nicoll
950d0b5164 Merge branch '6.2.x' 2024-12-23 12:31:31 +01:00
Stéphane Nicoll
5ce5647d09 Restore support of exact match property
This commit fixes a regression in property placeholder resolution where
the original key was no longer considered for an exact match before
processing the placeholder itself.

By default, property resolution uses ':' as the separator between the
key and the fallback value.

Consider a request to resolve ${prefix://service}. Previously,
placeholder resolution would first attempt to resolve the raw text, that
is 'prefix://service', before attempting to resolve the 'prefix' key and
then use '//service' if the key did not resolve.

This commit restores that behaviour purely for backward compatible
reason.

Closes gh-34124
2024-12-23 12:19:45 +01:00
Sébastien Deleuze
bccd9e9f11 Merge branch '6.2.x' 2024-12-23 11:15:08 +01:00
Tran Ngoc Nhan
ebae02a92b Fix broken links in the web reference documentation
Closes gh-34115
2024-12-23 11:14:40 +01:00
Sam Brannen
bf06d74879 Merge branch '6.2.x' 2024-12-21 16:03:43 +01:00
Sam Brannen
99cb6ba0a7 Upgrade to Gradle 8.12 2024-12-21 16:02:15 +01:00
Sam Brannen
2baf70768d Upgrade to AssertJ 3.27 2024-12-21 15:49:31 +01:00
Sam Brannen
5b8e436c98 Merge branch '6.2.x' 2024-12-21 15:31:29 +01:00
Sam Brannen
724700d708 Polishing 2024-12-21 15:31:01 +01:00
Andreas Kruck
83ba7e69ec Fix minor typo in reference documentation for Kotlin annotations
Closes gh-34134
2024-12-21 15:28:33 +01:00
rstoyanchev
373763723e Deprecate use of PathMatcher and UrlPathHelper in web
Closes gh-34018
2024-12-19 15:59:41 +00:00
rstoyanchev
41a9db376d Deprecate pathExtension routing predicates
Closes gh-34103
2024-12-19 15:59:18 +00:00