Skip to content

Commit 6da0db8

Browse files
authored
Fix java.lang.IllegalStateException: Unsupported extension type: ...
When a ReactiveMongoRepository uses an @query annotation, I get a java.lang.IllegalStateException: Unsupported extension type: org.springframework.data.jpa.repository.support.JpaEvaluationContextExtension thrown by ReactiveExtensionAwareEvaluationContextProvider after upgrading to spring-data-commons 2.4x+. It appears that the if (it instanceof EvaluationContextExtension) { clause is missing a return Mono.empty(); when extensionFilter.test(information) returns false like if (it instanceof ReactiveEvaluationContextExtension) { has. This allows it to fall through and return the Mono.error(...). Closes #2392
1 parent 8477383 commit 6da0db8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/org/springframework/data/spel/ReactiveExtensionAwareEvaluationContextProvider.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,8 @@ private Mono<List<EvaluationContextExtension>> getExtensions(
125125
if (extensionFilter.test(information)) {
126126
return Mono.just(extension);
127127
}
128+
129+
return Mono.empty();
128130
}
129131

130132
if (it instanceof ReactiveEvaluationContextExtension) {

0 commit comments

Comments
 (0)