Polishing.
Add missing Nullable annotations. Reorder methods. See: #2996 Original pull request: #2997
This commit is contained in:
@@ -249,6 +249,7 @@ public interface BoundListOperations<K, V> extends BoundKeyOperations<K> {
|
||||
* @since 2.4
|
||||
* @see <a href="https://redis.io/commands/lpos">Redis Documentation: LPOS</a>
|
||||
*/
|
||||
@Nullable
|
||||
Long indexOf(V value);
|
||||
|
||||
/**
|
||||
@@ -260,6 +261,7 @@ public interface BoundListOperations<K, V> extends BoundKeyOperations<K> {
|
||||
* @since 2.4
|
||||
* @see <a href="https://redis.io/commands/lpos">Redis Documentation: LPOS</a>
|
||||
*/
|
||||
@Nullable
|
||||
Long lastIndexOf(V value);
|
||||
|
||||
/**
|
||||
|
||||
@@ -131,13 +131,6 @@ public abstract class AbstractRedisCollection<E> extends AbstractCollection<E> i
|
||||
key = newKey;
|
||||
}
|
||||
|
||||
protected void checkResult(@Nullable Object obj) {
|
||||
|
||||
if (obj == null) {
|
||||
throw new IllegalStateException("Cannot read collection with Redis connection in pipeline/multi-exec mode");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(@Nullable Object o) {
|
||||
|
||||
@@ -168,4 +161,11 @@ public abstract class AbstractRedisCollection<E> extends AbstractCollection<E> i
|
||||
public String toString() {
|
||||
return "%s for key: %s".formatted(getClass().getSimpleName(), getKey());
|
||||
}
|
||||
|
||||
protected void checkResult(@Nullable Object obj) {
|
||||
|
||||
if (obj == null) {
|
||||
throw new IllegalStateException("Cannot read collection with Redis connection in pipeline/multi-exec mode");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,7 +187,6 @@ public class DefaultRedisMap<K, V> implements RedisMap<K, V> {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
|
||||
return "RedisStore for key:" + getKey();
|
||||
}
|
||||
|
||||
@@ -317,17 +316,17 @@ public class DefaultRedisMap<K, V> implements RedisMap<K, V> {
|
||||
return hashOps.getType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Cursor<java.util.Map.Entry<K, V>> scan() {
|
||||
return scan(ScanOptions.NONE);
|
||||
}
|
||||
|
||||
private void checkResult(@Nullable Object obj) {
|
||||
if (obj == null) {
|
||||
throw new IllegalStateException("Cannot read collection with Redis connection in pipeline/multi-exec mode");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Cursor<java.util.Map.Entry<K, V>> scan() {
|
||||
return scan(ScanOptions.NONE);
|
||||
}
|
||||
|
||||
/**
|
||||
* @since 1.4
|
||||
* @param options
|
||||
|
||||
Reference in New Issue
Block a user