Skip to content
Closed
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 @@ -61,7 +61,6 @@
import org.springframework.util.Assert;
import org.springframework.util.ClassUtils;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import org.springframework.util.comparator.NullSafeComparator;

Expand Down Expand Up @@ -109,6 +108,7 @@
* @author Greg Turnquist
* @author Mark Paluch
* @author Golam Mazid Sajib
* @author Zhixuan Wu
* @since 1.7
*/
public class MappingRedisConverter implements RedisConverter, InitializingBean {
Expand Down Expand Up @@ -317,7 +317,7 @@ protected Object readProperty(String path, RedisData source, RedisPersistentProp
return null;
}

if (persistentProperty.isIdProperty() && ObjectUtils.isEmpty(path.isEmpty())) {
if (persistentProperty.isIdProperty() && !StringUtils.hasText(path.isEmpty())) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still wrong as we want to check whether path is empty, not whether isEmpty returns an empty result.

return sourceBytes != null ? fromBytes(sourceBytes, typeInformation.getType()) : source.getId();
}

Expand Down