Skip to content

Commit 0df39ac

Browse files
jxblumschauder
authored andcommitted
DATACMNS-1804 - Correct grammar in Exception messages thrown by Repository classes.
Original pull request: #467.
1 parent 512825f commit 0df39ac

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

src/main/java/org/springframework/data/repository/core/support/QueryExecutorMethodInterceptor.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import org.aopalliance.intercept.MethodInterceptor;
2828
import org.aopalliance.intercept.MethodInvocation;
2929
import org.reactivestreams.Publisher;
30-
3130
import org.springframework.core.KotlinDetector;
3231
import org.springframework.core.ResolvableType;
3332
import org.springframework.data.projection.ProjectionFactory;
@@ -51,6 +50,7 @@
5150
*
5251
* @author Oliver Gierke
5352
* @author Mark Paluch
53+
* @author John Blum
5454
*/
5555
class QueryExecutorMethodInterceptor implements MethodInterceptor {
5656

@@ -75,9 +75,9 @@ public QueryExecutorMethodInterceptor(RepositoryInformation repositoryInformatio
7575

7676
if (!queryLookupStrategy.isPresent() && repositoryInformation.hasQueryMethods()) {
7777

78-
throw new IllegalStateException("You have defined query method in the repository but "
79-
+ "you don't have any query lookup strategy defined. The "
80-
+ "infrastructure apparently does not support query methods!");
78+
throw new IllegalStateException("You have defined query methods in the repository"
79+
+ " but do not have any query lookup strategy defined."
80+
+ " The infrastructure apparently does not support query methods!");
8181
}
8282

8383
this.queries = queryLookupStrategy //

src/main/java/org/springframework/data/repository/core/support/RepositoryFactorySupport.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
* @author Mark Paluch
7979
* @author Christoph Strobl
8080
* @author Jens Schauder
81+
* @author John Blum
8182
*/
8283
@Slf4j
8384
public abstract class RepositoryFactorySupport implements BeanClassLoaderAware, BeanFactoryAware {
@@ -477,7 +478,7 @@ private void validate(RepositoryInformation repositoryInformation, RepositoryCom
477478
if (composition.isEmpty()) {
478479

479480
throw new IllegalArgumentException(
480-
String.format("You have custom methods in %s but not provided a custom implementation!",
481+
String.format("You have custom methods in %s but have not provided a custom implementation!",
481482
repositoryInformation.getRepositoryInterface()));
482483
}
483484

0 commit comments

Comments
 (0)