-
Notifications
You must be signed in to change notification settings - Fork 58
Open
Description
Hi,
first thanks for this nice implementation. I faced an issue and wanted to inform you about that.
In JpaSpecificationExecutorWithProjectionImpl:
private <R> Page<R> readPageWithProjection(Specification<T> spec, Class<R> projectionType, Pageable pageable, TypedQuery<T> query) {
if (log.isDebugEnabled()) {
query.getHints().forEach((key, value) -> {
log.info("apply query hints -> {} : {}", key, value);
});
}
Page<T> result = pageable == null ? new PageImpl(query.getResultList()) : this.readPage(query, this.getDomainClass(), pageable, spec);
return ((Page)result).map((item) -> {
return this.projectionFactory.createProjection(projectionType, item);
});
}
if (log.isDebugEnabled()) should be
if (log.isDebugEnabled() && !query.getHints.isEmpty())
There is no logical relationship between being in debug mode and having queryhints, at least I don't know. If we leave the code like this, it throws NPE in debug mode. I solved the problem by going out of debug mode.
Regards,
Deniz
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels