Enhance CouchbaseDocument and CouchbaseList to handle List implementa… #2042
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.
Fix for Collections.SingletonList handling in Spring Data Couchbase
This PR addresses an issue where
Collections.SingletonList
and other List implementations cannot be stored directly in Couchbase documents after upgrading to Spring Boot 3.4.3 with Spring Data Couchbase 5.4.3.Details
The error manifests as:
The fix adds special handling for List implementations in the
verifyValueType
methods of bothCouchbaseDocument
andCouchbaseList
classes, allowing them to be processed without requiring explicit conversion.Changes
CouchbaseDocument.verifyValueType()
to acceptList
implementationsCouchbaseList.verifyValueType()
to acceptList
implementationsThis change ensures backward compatibility with code that worked in Spring Boot 3.2.4 while maintaining proper functionality in Spring Boot 3.4.3.