Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
* @author Greg Turnquist
* @author Mark Paluch
* @author Golam Mazid Sajib
* @author Leehyoungwoo
* @since 1.7
*/
public class MappingRedisConverter implements RedisConverter, InitializingBean {
Expand Down Expand Up @@ -404,6 +405,17 @@ public void write(Object source, RedisData sink) {
return;
}

if (source instanceof Collection) {
writeCollection(
sink.getKeyspace(),
"",
(List<?>) source,
TypeInformation.of(Object.class),
sink
);
return;
}

RedisPersistentEntity<?> entity = mappingContext.getPersistentEntity(source.getClass());

if (!customConversions.hasCustomWriteTarget(source.getClass())) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1997,9 +1997,8 @@ void readGenericEntity() {
assertThat(generic.entity.name).isEqualTo("hello");
}

@Test // DATAREDIS-1175
@EnabledOnJre(JRE.JAVA_8)
// FIXME: https://github.com/spring-projects/spring-data-redis/issues/2168
@Test // GH-2168
// @EnabledOnJre(JRE.JAVA_8)
void writePlainList() {

List<Object> source = Arrays.asList("Hello", "stream", "message", 100L);
Expand Down