Skip to content

Removed private getConversions() from MappingElasticsearchConverter #2003

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 20, 2021
Merged
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 @@ -83,6 +83,7 @@
* @author Konrad Kurdej
* @author Subhobrata Dey
* @author Marc Vanbrabant
* @author Anton Naydenov
* @since 3.2
*/
public class MappingElasticsearchConverter
Expand Down Expand Up @@ -145,22 +146,18 @@ public void setConversions(CustomConversions conversions) {
this.conversions = conversions;
}

private CustomConversions getConversions() {
return conversions;
}

@Override
public void afterPropertiesSet() {
DateFormatterRegistrar.addDateConverters(conversionService);
getConversions().registerConvertersIn(conversionService);
conversions.registerConvertersIn(conversionService);
}

// region read/write

@Override
public <R> R read(Class<R> type, Document source) {

Reader reader = new Reader(mappingContext, conversionService, getConversions(), spELContext, instantiators);
Reader reader = new Reader(mappingContext, conversionService, conversions, spELContext, instantiators);
return reader.read(type, source);
}

Expand All @@ -169,7 +166,7 @@ public void write(Object source, Document sink) {

Assert.notNull(source, "source to map must not be null");

Writer writer = new Writer(mappingContext, conversionService, getConversions());
Writer writer = new Writer(mappingContext, conversionService, conversions);
writer.write(source, sink);
}

Expand Down