DATACMNS-444 - DefaultPersistentPropertyPath now skips null converted names.
If a Converter handed into DefaultPersistentPropertyPath.toDotPath(…) returns null or an empty string for a mapped property name, that value is skipped during path construction.
This commit is contained in:
@@ -93,10 +93,15 @@ class DefaultPersistentPropertyPath<T extends PersistentProperty<T>> implements
|
||||
List<String> result = new ArrayList<String>();
|
||||
|
||||
for (T property : properties) {
|
||||
result.add(converterToUse.convert(property));
|
||||
|
||||
String convert = converterToUse.convert(property);
|
||||
|
||||
if (StringUtils.hasText(convert)) {
|
||||
result.add(convert);
|
||||
}
|
||||
}
|
||||
|
||||
return StringUtils.collectionToDelimitedString(result, delimiterToUse);
|
||||
return result.isEmpty() ? null : StringUtils.collectionToDelimitedString(result, delimiterToUse);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user