Improve value class handling after #36449#36665
Open
sgerke-1L wants to merge 237 commits intospring-projects:mainfrom
Open
Improve value class handling after #36449#36665sgerke-1L wants to merge 237 commits intospring-projects:mainfrom
sgerke-1L wants to merge 237 commits intospring-projects:mainfrom
Conversation
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>
See spring-projectsgh-35711 (cherry picked from commit 0342cd0)
Closes spring-projectsgh-35835 (cherry picked from commit de5b9aa)
Closes spring-projectsgh-35840 (cherry picked from commit bc3431f)
Closes spring-projectsgh-35842 (cherry picked from commit 57a1d40)
Closes spring-projectsgh-35836 (cherry picked from commit 35b8fbf)
Closes spring-projectsgh-35853 Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com> (cherry picked from commit 91d2a51)
See spring-projectsgh-35853 (cherry picked from commit 9fe4e77)
Closes spring-projectsgh-35829 (cherry picked from commit 3026f0a)
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)
(cherry picked from commit e625a28)
Closes spring-projectsgh-35892 (cherry picked from commit f4ee120)
Closes spring-projectsgh-35897 (cherry picked from commit 9d4abb6)
Closes spring-projectsgh-35895 (cherry picked from commit c1b6bfb)
(cherry picked from commit f58d0f6)
Closes spring-projectsgh-35901 (cherry picked from commit 6504177)
Closes spring-projectsgh-35904 Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
Closes spring-projectsgh-35908 (cherry picked from commit 6c3132c)
Closes spring-projectsgh-36609 (cherry picked from commit 0150c4b)
Closes spring-projectsgh-36621 (cherry picked from commit b8f1005)
…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)
See spring-projectsgh-36269 See spring-projectsgh-36600 (cherry picked from commit 99b78ad)
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
Closes spring-projectsgh-36643 Signed-off-by: T45K <tasktas9@gmail.com>
(cherry picked from commit 21f3b96)
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)
See spring-projectsgh-36652 (cherry picked from commit cb32046)
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 c9b88b4)
(cherry picked from commit 61bd790)
See spring-projectsgh-36625 (cherry picked from commit 63817ce)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The fix in #36449 introduces a regression related to the handling of value class conversion. In particular, passing e.g.
UUIDfor an argument of typeValueClass(val value: UUID)doesn't work anymore. This is required to make ValueClass parameters work, see added integration tests.Fix description
CoroutineUtils#36449 to fix the aforementioned regressionCoroutineUtils#36449 by introducing a!JvmClassMappingKt.getJavaClass(kClass).isInstance(arg)guard in the appropriate places, and keeps the regression test in from Handle Kotlin nullable value class param correctly inCoroutineUtils#36449