Skip to content

Commit 096d91a

Browse files
GH-2496 - Remove superfluous RecordMapAccessor.
This closes #2496.
1 parent ccd8e96 commit 096d91a

File tree

2 files changed

+2
-88
lines changed

2 files changed

+2
-88
lines changed

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

+2-3
Original file line numberDiff line numberDiff line change
@@ -61,15 +61,14 @@
6161
public final class PreparedQuery<T> {
6262

6363
public static <CT> RequiredBuildStep<CT> queryFor(Class<CT> resultType) {
64-
return new RequiredBuildStep<CT>(resultType);
64+
return new RequiredBuildStep<>(resultType);
6565
}
6666

6767
private final Class<T> resultType;
6868
private final QueryFragmentsAndParameters queryFragmentsAndParameters;
6969
private final @Nullable Supplier<BiFunction<TypeSystem, MapAccessor, ?>> mappingFunctionSupplier;
7070
private volatile Optional<BiFunction<TypeSystem, Record, T>> lastMappingFunction = Optional.empty();
7171

72-
@SuppressWarnings("unchecked")
7372
private PreparedQuery(OptionalBuildSteps<T> optionalBuildSteps) {
7473
this.resultType = optionalBuildSteps.resultType;
7574
this.mappingFunctionSupplier = optionalBuildSteps.mappingFunctionSupplier;
@@ -244,7 +243,7 @@ public Object apply(TypeSystem t, Record r) {
244243
}
245244

246245
try {
247-
return target.apply(t, new RecordMapAccessor(r));
246+
return target.apply(t, r);
248247
} catch (NoRootNodeMappingException e) {
249248

250249
// We didn't find anything on the top level. It still can be a path plus some additional information

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

-85
This file was deleted.

0 commit comments

Comments
 (0)