Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

Commit e2198e3

Browse files
committed
Handle deleteBy properly to avoid NullPointerException.
Resolves #97.
1 parent 318963a commit e2198e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/springframework/session/data/mongo/ReactiveMongoOperationsSessionRepository.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public Mono<Void> deleteById(String id) {
136136
.flatMap(document -> this.mongoOperations.remove(document, this.collectionName) //
137137
.then(Mono.just(document))) //
138138
.map(document -> convertToSession(this.mongoSessionConverter, document)) //
139-
.doOnSuccess(mongoSession -> publishEvent(new SessionDeletedEvent(this, mongoSession))) //
139+
.doOnNext(mongoSession -> publishEvent(new SessionDeletedEvent(this, mongoSession))) //
140140
.then();
141141
}
142142

0 commit comments

Comments
 (0)