Skip to content

Commit 8b5f29e

Browse files
Deprecate method instead of removing it.
Original Pull Request: spring-projects#2935
1 parent 4203a5b commit 8b5f29e

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

src/main/java/org/springframework/data/redis/core/mapping/BasicRedisPersistentEntity.java

-5
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,6 @@ public TimeToLiveAccessor getTimeToLiveAccessor() {
5757
return this.timeToLiveAccessor;
5858
}
5959

60-
@Override
61-
public boolean hasExplicitTimeToLiveProperty() {
62-
return getExplicitTimeToLiveProperty() != null;
63-
}
64-
6560
@Override
6661
@Nullable
6762
public RedisPersistentProperty getExplicitTimeToLiveProperty() {

src/main/java/org/springframework/data/redis/core/mapping/RedisPersistentEntity.java

+13-1
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,20 @@ public interface RedisPersistentEntity<T> extends KeyValuePersistentEntity<T, Re
4040
/**
4141
* @return {@literal true} when a property is annotated with {@link org.springframework.data.redis.core.TimeToLive}.
4242
* @since 1.8
43+
* @deprecated in favor of {@link #hasExplicitTimeToLiveProperty()}.
4344
*/
44-
boolean hasExplicitTimeToLiveProperty();
45+
@Deprecated(forRemoval = true)
46+
default boolean hasExplictTimeToLiveProperty() {
47+
return hasExplicitTimeToLiveProperty();
48+
}
49+
50+
/**
51+
* @return {@literal true} when a property is annotated with {@link org.springframework.data.redis.core.TimeToLive}.
52+
* @since 3.4
53+
*/
54+
default boolean hasExplicitTimeToLiveProperty() {
55+
return getExplicitTimeToLiveProperty() != null;
56+
}
4557

4658
/**
4759
* Get the {@link PersistentProperty} that is annotated with {@link org.springframework.data.redis.core.TimeToLive}.

0 commit comments

Comments
 (0)