@@ -690,12 +690,10 @@ private Collection<Node> extractNodes(MapAccessor allValues) {
690690 .flatMap (entry -> MappingSupport .extractNodesFromCollection (listType , entry ).stream ())
691691 .forEach (allNodesInResult ::add );
692692
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 );
699697
700698 return allNodesInResult ;
701699 }
@@ -717,12 +715,10 @@ private Collection<Relationship> extractRelationships(MapAccessor allValues) {
717715 .flatMap (entry -> MappingSupport .extractRelationshipsFromCollection (listType , entry ).stream ())
718716 .forEach (allRelationshipsInResult ::add );
719717
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 );
726722
727723 return allRelationshipsInResult ;
728724 }
0 commit comments