Skip to content

Getting NPE when writing valid Query Method without any criteria [DATAREDIS-547] #1123

Closed
@spring-projects-issues

Description

@spring-projects-issues

Dieter Hubau opened DATAREDIS-547 and commented

When creating a valid query method in Spring Data Redis without any criteria, for example:

Game findFirstByOrderByStartDesc();

We don't get an error stating that Ordering/Sorting is not supported for Redis, but instead we receive a NPE in the following class:

org.springframework.data.redis.repository.query.RedisQueryCreator#complete

Affects: 1.7.2 (Hopper SR2), 1.8 M1 (Ingalls)

Reference URL: https://github.com/spring-projects/spring-data-redis/blob/1.8.0.M1/src/main/java/org/springframework/data/redis/repository/query/RedisQueryCreator.java#L88

Issue Links:

  • DATAKV-142 Consider PartTree.isLimiting() and PartTree.getMaxResults() when creating queries
    ("depends on")

Referenced from: pull request #216

Backported to: 1.7.3 (Hopper SR3)

Metadata

Metadata

Labels

in: coreIssues in core supporttype: bugA general bug

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions