diff --git a/src/main/java/org/springframework/data/redis/core/RedisQueryEngine.java b/src/main/java/org/springframework/data/redis/core/RedisQueryEngine.java index 34eabcfa0..4945b5ed0 100644 --- a/src/main/java/org/springframework/data/redis/core/RedisQueryEngine.java +++ b/src/main/java/org/springframework/data/redis/core/RedisQueryEngine.java @@ -47,6 +47,7 @@ import org.springframework.util.CollectionUtils; * * @author Christoph Strobl * @author Mark Paluch + * @author Zhongning Fan * @since 1.7 */ class RedisQueryEngine extends QueryEngine> { diff --git a/src/test/java/org/springframework/data/redis/repository/RedisRepositoryIntegrationTestBase.java b/src/test/java/org/springframework/data/redis/repository/RedisRepositoryIntegrationTestBase.java index 7e14760a3..a0a0d8eda 100644 --- a/src/test/java/org/springframework/data/redis/repository/RedisRepositoryIntegrationTestBase.java +++ b/src/test/java/org/springframework/data/redis/repository/RedisRepositoryIntegrationTestBase.java @@ -48,9 +48,10 @@ import org.springframework.data.repository.PagingAndSortingRepository; /** * Base for testing Redis repository support in different configurations. - * + * * @author Christoph Strobl * @author Mark Paluch + * @author Zhongning Fan */ public abstract class RedisRepositoryIntegrationTestBase { @@ -354,14 +355,14 @@ public abstract class RedisRepositoryIntegrationTestBase { repo.save(Arrays.asList(eddard, robb, sansa)); - Page page1 = repo.findByFirstnameAndLastname("sansa", "stark", new PageRequest(0, 2)); + Page result = repo.findByFirstnameAndLastname("sansa", "stark", new PageRequest(0, 2)); - assertThat(page1.getNumberOfElements(), is(1)); - assertThat(page1.getContent(), hasSize(1)); - assertThat(page1.getTotalElements(), is(1L)); + assertThat(result.getNumberOfElements(), is(1)); + assertThat(result.getContent(), hasSize(1)); + assertThat(result.getTotalElements(), is(1L)); } - public static interface PersonRepository extends PagingAndSortingRepository { + interface PersonRepository extends PagingAndSortingRepository { List findByFirstname(String firstname); @@ -386,14 +387,14 @@ public abstract class RedisRepositoryIntegrationTestBase { List findByHometownLocationNear(Point point, Distance distance); } - public static interface CityRepository extends CrudRepository { + interface CityRepository extends CrudRepository { List findByLocationNear(Point point, Distance distance); } /** * Custom Redis {@link IndexConfiguration} forcing index of {@link Person#lastname}. - * + * * @author Christoph Strobl */ static class MyIndexConfiguration extends IndexConfiguration { @@ -406,7 +407,7 @@ public abstract class RedisRepositoryIntegrationTestBase { /** * Custom Redis {@link IndexConfiguration} forcing index of {@link Person#lastname}. - * + * * @author Christoph Strobl */ static class MyKeyspaceConfiguration extends KeyspaceConfiguration {