Browse Source

Added missing null check for metadata.

See #2716
Closes #2897
pull/2928/head
Jens Schauder 3 years ago
parent
commit
393fa635bd
No known key found for this signature in database
GPG Key ID: 9537B67540F0A581
  1. 2
      spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java

2
spring-data-jpa/src/main/java/org/springframework/data/jpa/repository/support/SimpleJpaRepository.java

@ -309,7 +309,7 @@ public class SimpleJpaRepository<T, ID> implements JpaRepositoryImplementation<T @@ -309,7 +309,7 @@ public class SimpleJpaRepository<T, ID> implements JpaRepositoryImplementation<T
getQueryHints().withFetchGraphs(em).forEach(hints::put);
if (metadata.getComment() != null && provider.getCommentHintKey() != null) {
if (metadata != null && metadata.getComment() != null && provider.getCommentHintKey() != null) {
hints.put(provider.getCommentHintKey(), provider.getCommentHintValue(metadata.getComment()));
}

Loading…
Cancel
Save