Skip to content

Commit e2360dc

Browse files
GH-2428 - Polishing.
1 parent 0f50884 commit e2360dc

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/main/java/org/springframework/data/neo4j/core/PreparedQuery.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,11 @@ public Class<T> getResultType() {
8181

8282
@SuppressWarnings("unchecked")
8383
public synchronized Optional<BiFunction<TypeSystem, Record, T>> getOptionalMappingFunction() {
84-
Optional<BiFunction<TypeSystem, Record, T>> currentMappingFunction = Optional.ofNullable(
84+
lastMappingFunction = Optional.ofNullable(
8585
this.mappingFunctionSupplier)
8686
.map(Supplier::get)
8787
.map(f -> (BiFunction<TypeSystem, Record, T>) new AggregatingMappingFunction(f));
88-
lastMappingFunction = currentMappingFunction;
89-
return currentMappingFunction;
88+
return lastMappingFunction;
9089
}
9190

9291
synchronized boolean resultsHaveBeenAggregated() {

0 commit comments

Comments
 (0)