From dcf4991f39e5891c9b073d47ee8ed0f6d3bfef96 Mon Sep 17 00:00:00 2001 From: Christoph Strobl Date: Wed, 8 Jan 2025 16:18:13 +0100 Subject: [PATCH] Deprecate Specification.where. The where method will be removed with next major version containing some refinements in the Specification API. See: #3578 --- .../java/org/springframework/data/jpa/domain/Specification.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/Specification.java b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/Specification.java index ea626af591..3f4fc36408 100644 --- a/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/Specification.java +++ b/spring-data-jpa/src/main/java/org/springframework/data/jpa/domain/Specification.java @@ -65,7 +65,9 @@ static Specification not(@Nullable Specification spec) { * @param spec can be {@literal null}. * @return guaranteed to be not {@literal null}. * @since 2.0 + * @deprecated since 3.5. */ + @Deprecated(since = "3.5.0", forRemoval = true) static Specification where(@Nullable Specification spec) { return spec == null ? (root, query, builder) -> null : spec; }