@@ -690,12 +690,10 @@ private Collection<Node> extractNodes(MapAccessor allValues) {
690
690
.flatMap (entry -> MappingSupport .extractNodesFromCollection (listType , entry ).stream ())
691
691
.forEach (allNodesInResult ::add );
692
692
693
- if (allNodesInResult .isEmpty ()) {
694
- StreamSupport .stream (allValues .values ().spliterator (), false )
695
- .filter (this .nodeType ::isTypeOf )
696
- .map (Value ::asNode )
697
- .forEach (allNodesInResult ::add );
698
- }
693
+ StreamSupport .stream (allValues .values ().spliterator (), false )
694
+ .filter (this .nodeType ::isTypeOf )
695
+ .map (Value ::asNode )
696
+ .forEach (allNodesInResult ::add );
699
697
700
698
return allNodesInResult ;
701
699
}
@@ -717,12 +715,10 @@ private Collection<Relationship> extractRelationships(MapAccessor allValues) {
717
715
.flatMap (entry -> MappingSupport .extractRelationshipsFromCollection (listType , entry ).stream ())
718
716
.forEach (allRelationshipsInResult ::add );
719
717
720
- if (allRelationshipsInResult .isEmpty ()) {
721
- StreamSupport .stream (allValues .values ().spliterator (), false )
722
- .filter (this .relationshipType ::isTypeOf )
723
- .map (Value ::asRelationship )
724
- .forEach (allRelationshipsInResult ::add );
725
- }
718
+ StreamSupport .stream (allValues .values ().spliterator (), false )
719
+ .filter (this .relationshipType ::isTypeOf )
720
+ .map (Value ::asRelationship )
721
+ .forEach (allRelationshipsInResult ::add );
726
722
727
723
return allRelationshipsInResult ;
728
724
}
0 commit comments