diff --git a/src/main/java/io/hexlet/blog/specification/PostCommentSpecification.java b/src/main/java/io/hexlet/blog/specification/PostCommentSpecification.java index 1520aba..fd87f85 100644 --- a/src/main/java/io/hexlet/blog/specification/PostCommentSpecification.java +++ b/src/main/java/io/hexlet/blog/specification/PostCommentSpecification.java @@ -14,9 +14,7 @@ @Component public class PostCommentSpecification { public Specification build(PostCommentParamsDTO params) { - Specification spec = Specification.where(null); - return spec - .and(withPostId(params.getPostId())) + return withPostId(params.getPostId()) .and(withCreatedAtGt(params.getCreatedAtGt())); }