Skip to content

Commit c045873

Browse files
mjd507spring-builds
authored andcommitted
Fix exception message for JpaExecutor.doPoll()
Signed-off-by: Jiandong Ma <[email protected]> [[email protected] Improve commit message] Fixes: #9997 The `nativeQuery` has to be mention in the possible required options to configure. (cherry picked from commit 119209d)
1 parent 8629258 commit c045873

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

spring-integration-jpa/src/main/java/org/springframework/integration/jpa/core/JpaExecutor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2023 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -569,7 +569,7 @@ else if (this.entityClass != null) {
569569
else {
570570
throw new IllegalStateException("For the polling operation, one of "
571571
+ "the following properties must be specified: "
572-
+ "query, namedQuery or entityClass.");
572+
+ "jpaQuery, nativeQuery, namedQuery or entityClass.");
573573
}
574574
return payload;
575575
}

spring-integration-jpa/src/test/java/org/springframework/integration/jpa/core/JpaExecutorTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2022 the original author or authors.
2+
* Copyright 2002-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -75,7 +75,7 @@ public void testExecutePollWithNoEntityClassSpecified() {
7575
.isThrownBy(jpaExecutor::poll)
7676
.withMessage("For the polling operation, one of "
7777
+ "the following properties must be specified: "
78-
+ "query, namedQuery or entityClass.");
78+
+ "jpaQuery, nativeQuery, namedQuery or entityClass.");
7979
}
8080

8181
@Test

0 commit comments

Comments
 (0)