Simplify return path for reading collections.
Reduce the nesting level of byte[] checks and processing. Original Pull Request: #2015
This commit is contained in:
@@ -284,15 +284,14 @@ public class MappingRedisConverter implements RedisConverter, InitializingBean {
|
||||
|
||||
if (typeInformation.isCollectionLike()) {
|
||||
|
||||
if (isByteArray(typeInformation)) {
|
||||
if (!isByteArray(typeInformation)) {
|
||||
|
||||
// accept collection form for byte[] if there's no dedicated key
|
||||
if (!source.getBucket().hasValue(currentPath) && isByteArray(typeInformation)) {
|
||||
return readCollectionOrArray(currentPath, typeInformation.getType(),
|
||||
typeInformation.getRequiredComponentType().getType(), source.getBucket());
|
||||
}
|
||||
|
||||
if (!source.getBucket().hasValue(currentPath) && isByteArray(typeInformation)) {
|
||||
|
||||
return readCollectionOrArray(currentPath, typeInformation.getType(),
|
||||
typeInformation.getRequiredComponentType().getType(), source.getBucket());
|
||||
}
|
||||
} else {
|
||||
return readCollectionOrArray(currentPath, typeInformation.getType(),
|
||||
typeInformation.getRequiredComponentType().getType(), source.getBucket());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user