Skip to content

Improve value class handling after #36449#36665

Open
sgerke-1L wants to merge 237 commits intospring-projects:mainfrom
sgerke-1L:fix-handler
Open

Improve value class handling after #36449#36665
sgerke-1L wants to merge 237 commits intospring-projects:mainfrom
sgerke-1L:fix-handler

Conversation

@sgerke-1L
Copy link
Copy Markdown

@sgerke-1L sgerke-1L commented Apr 17, 2026

The fix in #36449 introduces a regression related to the handling of value class conversion. In particular, passing e.g. UUID for an argument of type ValueClass(val value: UUID) doesn't work anymore. This is required to make ValueClass parameters work, see added integration tests.

Fix description

kilink and others added 30 commits November 17, 2025 12:27
The Spliterators returned by values, entrySet, and keySet incorrectly
reported the SIZED characteristic, instead of CONCURRENT. This could
lead to bugs when the map is concurrently modified during a stream
operation.

For keySet and values, the incorrect characteristics are inherited from
AbstractMap, so to rectify that the respective methods are overridden,
and custom collections are provided that report the correct Spliterator
characteristics.

Closes spring-projectsgh-35817

Signed-off-by: Patrick Strawderman <pstrawderman@netflix.com>

(cherry picked from commit ed75906)
See spring-projectsgh-35817

(cherry picked from commit 09a8bbc)
Read the respective fields only once in the values(), entrySet(), and
keySet() methods.

Closes spring-projectsgh-35822

Signed-off-by: Patrick Strawderman <pstrawderman@netflix.com>

(cherry picked from commit 3b6be3d)
See spring-projectsgh-35477

Signed-off-by: potato <65760583+juntae6942@users.noreply.github.com>
(cherry picked from commit f456674)
Closes spring-projectsgh-35853

Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>

(cherry picked from commit 91d2a51)
(cherry picked from commit d178930)
Closes spring-projectsgh-35877

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit revises the Integration Testing chapter to reference the
"Spring Framework Artifacts" wiki page instead of the nonexistent
"Dependency Management" section of the reference manual.

Closes spring-projectsgh-35890

(cherry picked from commit 45c1cd9)
Closes spring-projectsgh-35904
Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
jhoeller and others added 24 commits April 8, 2026 13:57
(cherry picked from commit 1687d90)
…Proxy

Prior to this commit, SqlScriptsTestExecutionListener unwrapped data
sources wrapped in an InfrastructureProxy or a scoped proxy, but it did
not unwrap a data source wrapped in a TransactionAwareDataSourceProxy.
Consequently, the sameDataSource() check failed in the latter case,
preventing execution of @⁠Sql scripts.

To address that, this commit revises sameDataSource() to unwrap a
TransactionAwareDataSourceProxy as well, analogous to the
implementations of setDataSource() in DataSourceTransactionManager,
JpaTransactionManager, and HibernateTransactionManager.

Closes spring-projectsgh-36611

(cherry picked from commit 6251b2c)
Prior to this commit, fields that are not allowed for binding were
always skipped and would not be bound. But the field and default marker
support (with the "_" and "!" prefixes) would be still considered and
could trigger collection instantiation/autogrow.

While this does not cause unwanted binding, this allocates memory for no
reason. This commit revisits the binding algorithm to only consider
default and field marker support if the regular field is allowed.

Fixes spring-projectsgh-36627
The Spring TestContext Framework does not honor the
`spring.profiles.active` system property when determining
active profiles for a test class if @⁠ActiveProfiles is
used.

This commit documents that behavior in the @⁠ActiveProfiles
and DefaultActiveProfilesResolver Javadoc, as well as in
the reference manual. A SystemPropertyActiveProfilesResolver
example is also added showing how to allow
`spring.profiles.active` to override @⁠ActiveProfiles.

See spring-projectsgh-36269
Closes spring-projectsgh-36600

Signed-off-by: Mohak Nagaraju <98132980+Mohak-Nagaraju@users.noreply.github.com>
(cherry picked from commit 644731c)
The builder itself does not allow `null` values so this shouldn't be
necessary, but because the offending change was introduced late in the
6.2.x line, we'll be more flexible here.

Fixes spring-projectsgh-36634
HttpMethod.valueOf() performs a case-sensitive lookup of predefined
HttpMethod constants. For example, valueOf("GET") resolves to
HttpMethod.GET, whereas valueOf("get") results in a newly created
HttpMethod instance.
Update the Javadoc to explicitly document this behavior.

See spring-projectsgh-36642
Closes spring-projectsgh-36652

Signed-off-by: angry-2k <edkev@kakao.com>

(cherry picked from commit df82845)
This commit reverts the changes made to WebDataBinder's doBind()
implementation in e4d03f6 and instead implements the skipping logic
directly in checkFieldDefaults(), checkFieldMarkers(), and
adaptEmptyArrayIndices() by preemptively checking if the corresponding
field is allowed.

This commit also improves the Javadoc and adds missing tests.

See spring-projectsgh-36625
Fixes spring-projectsgh-36627

(cherry picked from commit 68c575a)
(cherry picked from commit 61bd790)
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Apr 17, 2026
Signed-off-by: Sigurd Gerke <sigurd.gerke@onedata.de>
Signed-off-by: Sigurd Gerke <sigurd.gerke@onedata.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: waiting-for-triage An issue we've not yet triaged or decided on

Projects

None yet

Development

Successfully merging this pull request may close these issues.