Skip to content

Commit 2fbf709

Browse files
jxblumschauder
authored andcommitted
DATACMNS-1804 - Correct grammar in Exception messages thrown by Repository classes.
Original pull request: #467.
1 parent 4f06c71 commit 2fbf709

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
* @author Oliver Gierke
4646
* @author Mark Paluch
4747
* @author Christoph Strobl
48+
* @author John Blum
4849
*/
4950
class QueryExecutorMethodInterceptor implements MethodInterceptor {
5051

@@ -75,9 +76,9 @@ public QueryExecutorMethodInterceptor(RepositoryInformation repositoryInformatio
7576

7677
if (!queryLookupStrategy.isPresent() && repositoryInformation.hasQueryMethods()) {
7778

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!");
79+
throw new IllegalStateException("You have defined query methods in the repository"
80+
+ " but do not have any query lookup strategy defined."
81+
+ " The infrastructure apparently does not support query methods!");
8182
}
8283

8384
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
@@ -73,6 +73,7 @@
7373
* @author Mark Paluch
7474
* @author Christoph Strobl
7575
* @author Jens Schauder
76+
* @author John Blum
7677
*/
7778
public abstract class RepositoryFactorySupport implements BeanClassLoaderAware, BeanFactoryAware {
7879

@@ -449,7 +450,7 @@ private void validate(RepositoryInformation repositoryInformation, RepositoryCom
449450
if (composition.isEmpty()) {
450451

451452
throw new IllegalArgumentException(
452-
String.format("You have custom methods in %s but not provided a custom implementation!",
453+
String.format("You have custom methods in %s but have not provided a custom implementation!",
453454
repositoryInformation.getRepositoryInterface()));
454455
}
455456

0 commit comments

Comments
 (0)