Skip to content

Commit 3695b23

Browse files
committed
Polishing.
1 parent 9d57410 commit 3695b23

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: src/main/java/org/springframework/data/elasticsearch/core/convert/MappingElasticsearchConverter.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -556,11 +556,13 @@ private Object getPotentiallyConvertedSimpleRead(@Nullable Object value, @Nullab
556556
return conversionService.convert(value, target);
557557
}
558558

559-
private <T> void populateScriptFields(ElasticsearchPersistentEntity<?> entity, T result, SearchDocument searchDocument) {
559+
private <T> void populateScriptFields(ElasticsearchPersistentEntity<?> entity, T result,
560+
SearchDocument searchDocument) {
560561
Map<String, List<Object>> fields = searchDocument.getFields();
561562
entity.doWithProperties((SimplePropertyHandler) property -> {
562563
if (property.isAnnotationPresent(ScriptedField.class) && fields.containsKey(property.getName())) {
563564
ScriptedField scriptedField = property.findAnnotation(ScriptedField.class);
565+
// noinspection ConstantConditions
564566
String name = scriptedField.name().isEmpty() ? property.getName() : scriptedField.name();
565567
Object value = searchDocument.getFieldValue(name);
566568

0 commit comments

Comments
 (0)