Skip to content

Commit 6b7d005

Browse files
committed
Fix nullaway problems that appeared after reactor upgrade.
Signed-off-by: Gerrit Meier <[email protected]>
1 parent 0df1ba6 commit 6b7d005

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ private <T> Mono<Tuple2<T, DynamicLabels>> determineDynamicLabels(T entityToBeSa
566566
.one()
567567
.map(m -> (Collection<String>) m.get(Constants.NAME_OF_LABELS))
568568
.switchIfEmpty(Mono.just(Collections.emptyList()))
569-
.zipWith(Mono.just((Collection<String>) propertyAccessor.getProperty(p)))
569+
.zipWith(Mono.justOrEmpty((Collection<String>) propertyAccessor.getProperty(p)))
570570
.map(t -> Tuples.of(entityToBeSaved, new DynamicLabels(entityMetaData, t.getT1(), t.getT2())));
571571
}).orElse(Mono.just(Tuples.of(entityToBeSaved, DynamicLabels.EMPTY)));
572572
}

src/test/kotlin/org/springframework/data/neo4j/integration/reactive/ReactiveNeo4jClientKotlinInteropIT.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ class ReactiveNeo4jClientKotlinInteropIT @Autowired constructor(
9797
}.one()
9898

9999
StepVerifier.create(queen)
100-
.expectNextMatches { it.name == "Queen" && it.member.size == 4 }
100+
.expectNextMatches { it!!.name == "Queen" && it.member.size == 4 }
101101
.verifyComplete()
102102

103103
StepVerifier.create(neo4jClient.query("MATCH (n:IDontExists) RETURN id(n)").fetchAs<Long>().one())

0 commit comments

Comments
 (0)