Browse Source

DATACMNS-1804 - Correct grammar in Exception messages thrown by Repository classes.

Original pull request: #467.
pull/472/head
John Blum 5 years ago committed by Jens Schauder
parent
commit
2fbf709459
No known key found for this signature in database
GPG Key ID: 45CC872F17423DBF
  1. 7
      src/main/java/org/springframework/data/repository/core/support/QueryExecutorMethodInterceptor.java
  2. 3
      src/main/java/org/springframework/data/repository/core/support/RepositoryFactorySupport.java

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

@ -45,6 +45,7 @@ import org.springframework.util.ConcurrentReferenceHashMap; @@ -45,6 +45,7 @@ import org.springframework.util.ConcurrentReferenceHashMap;
* @author Oliver Gierke
* @author Mark Paluch
* @author Christoph Strobl
* @author John Blum
*/
class QueryExecutorMethodInterceptor implements MethodInterceptor {
@ -75,9 +76,9 @@ class QueryExecutorMethodInterceptor implements MethodInterceptor { @@ -75,9 +76,9 @@ class QueryExecutorMethodInterceptor implements MethodInterceptor {
if (!queryLookupStrategy.isPresent() && repositoryInformation.hasQueryMethods()) {
throw new IllegalStateException("You have defined query method in the repository but "
+ "you don't have any query lookup strategy defined. The "
+ "infrastructure apparently does not support query methods!");
throw new IllegalStateException("You have defined query methods in the repository"
+ " but do not have any query lookup strategy defined."
+ " The infrastructure apparently does not support query methods!");
}
this.queries = queryLookupStrategy //

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

@ -73,6 +73,7 @@ import org.springframework.util.ObjectUtils; @@ -73,6 +73,7 @@ import org.springframework.util.ObjectUtils;
* @author Mark Paluch
* @author Christoph Strobl
* @author Jens Schauder
* @author John Blum
*/
public abstract class RepositoryFactorySupport implements BeanClassLoaderAware, BeanFactoryAware {
@ -449,7 +450,7 @@ public abstract class RepositoryFactorySupport implements BeanClassLoaderAware, @@ -449,7 +450,7 @@ public abstract class RepositoryFactorySupport implements BeanClassLoaderAware,
if (composition.isEmpty()) {
throw new IllegalArgumentException(
String.format("You have custom methods in %s but not provided a custom implementation!",
String.format("You have custom methods in %s but have not provided a custom implementation!",
repositoryInformation.getRepositoryInterface()));
}

Loading…
Cancel
Save