Skip to content

Remove unnecessary Nullable annotation #2688

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ public interface GeoOperations<K, M> {
* @since 2.0
* @see <a href="https://redis.io/commands/geoadd">Redis Documentation: GEOADD</a>
*/
@Nullable
Long add(K key, Point point, M member);

/**
Expand All @@ -65,7 +64,6 @@ public interface GeoOperations<K, M> {
* @since 2.0
* @see <a href="https://redis.io/commands/geoadd">Redis Documentation: GEOADD</a>
*/
@Nullable
Long add(K key, GeoLocation<M> location);

/**
Expand All @@ -77,7 +75,6 @@ public interface GeoOperations<K, M> {
* @since 2.0
* @see <a href="https://redis.io/commands/geoadd">Redis Documentation: GEOADD</a>
*/
@Nullable
Long add(K key, Map<M, Point> memberCoordinateMap);

/**
Expand All @@ -89,7 +86,6 @@ public interface GeoOperations<K, M> {
* @since 2.0
* @see <a href="https://redis.io/commands/geoadd">Redis Documentation: GEOADD</a>
*/
@Nullable
Long add(K key, Iterable<GeoLocation<M>> locations);

/**
Expand Down Expand Up @@ -128,7 +124,6 @@ public interface GeoOperations<K, M> {
* @since 2.0
* @see <a href="https://redis.io/commands/geohash">Redis Documentation: GEOHASH</a>
*/
@Nullable
List<String> hash(K key, M... members);

/**
Expand All @@ -140,7 +135,6 @@ public interface GeoOperations<K, M> {
* @since 2.0
* @see <a href="https://redis.io/commands/geopos">Redis Documentation: GEOPOS</a>
*/
@Nullable
List<Point> position(K key, M... members);

/**
Expand All @@ -152,7 +146,6 @@ public interface GeoOperations<K, M> {
* @since 2.0
* @see <a href="https://redis.io/commands/georadius">Redis Documentation: GEORADIUS</a>
*/
@Nullable
GeoResults<GeoLocation<M>> radius(K key, Circle within);

/**
Expand All @@ -165,7 +158,6 @@ public interface GeoOperations<K, M> {
* @since 2.0
* @see <a href="https://redis.io/commands/georadius">Redis Documentation: GEORADIUS</a>
*/
@Nullable
GeoResults<GeoLocation<M>> radius(K key, Circle within, GeoRadiusCommandArgs args);

/**
Expand All @@ -179,7 +171,6 @@ public interface GeoOperations<K, M> {
* @since 2.0
* @see <a href="https://redis.io/commands/georadiusbymember">Redis Documentation: GEORADIUSBYMEMBER</a>
*/
@Nullable
GeoResults<GeoLocation<M>> radius(K key, M member, double radius);

/**
Expand All @@ -193,7 +184,6 @@ public interface GeoOperations<K, M> {
* @since 2.0
* @see <a href="https://redis.io/commands/georadiusbymember">Redis Documentation: GEORADIUSBYMEMBER</a>
*/
@Nullable
GeoResults<GeoLocation<M>> radius(K key, M member, Distance distance);

/**
Expand All @@ -208,7 +198,6 @@ public interface GeoOperations<K, M> {
* @since 2.0
* @see <a href="https://redis.io/commands/georadiusbymember">Redis Documentation: GEORADIUSBYMEMBER</a>
*/
@Nullable
GeoResults<GeoLocation<M>> radius(K key, M member, Distance distance, GeoRadiusCommandArgs args);

/**
Expand All @@ -219,7 +208,6 @@ public interface GeoOperations<K, M> {
* @return Number of elements removed. {@literal null} when used in pipeline / transaction.
* @since 2.0
*/
@Nullable
Long remove(K key, M... members);

/**
Expand All @@ -231,7 +219,6 @@ public interface GeoOperations<K, M> {
* @since 2.6
* @see <a href="https://redis.io/commands/geosearch">Redis Documentation: GEOSEARCH</a>
*/
@Nullable
default GeoResults<GeoLocation<M>> search(K key, Circle within) {
return search(key, GeoReference.fromCircle(within), GeoShape.byRadius(within.getRadius()),
GeoSearchCommandArgs.newGeoSearchArgs());
Expand All @@ -248,7 +235,6 @@ default GeoResults<GeoLocation<M>> search(K key, Circle within) {
* @since 2.6
* @see <a href="https://redis.io/commands/geosearch">Redis Documentation: GEOSEARCH</a>
*/
@Nullable
default GeoResults<GeoLocation<M>> search(K key, GeoReference<M> reference, Distance radius) {
return search(key, reference, radius, GeoSearchCommandArgs.newGeoSearchArgs());
}
Expand All @@ -265,7 +251,6 @@ default GeoResults<GeoLocation<M>> search(K key, GeoReference<M> reference, Dist
* @since 2.6
* @see <a href="https://redis.io/commands/geosearch">Redis Documentation: GEOSEARCH</a>
*/
@Nullable
default GeoResults<GeoLocation<M>> search(K key, GeoReference<M> reference, Distance radius,
GeoSearchCommandArgs args) {
return search(key, reference, GeoShape.byRadius(radius), args);
Expand All @@ -282,7 +267,6 @@ default GeoResults<GeoLocation<M>> search(K key, GeoReference<M> reference, Dist
* @since 2.6
* @see <a href="https://redis.io/commands/geosearch">Redis Documentation: GEOSEARCH</a>
*/
@Nullable
default GeoResults<GeoLocation<M>> search(K key, GeoReference<M> reference,
BoundingBox boundingBox) {
return search(key, reference, boundingBox, GeoSearchCommandArgs.newGeoSearchArgs());
Expand All @@ -300,7 +284,6 @@ default GeoResults<GeoLocation<M>> search(K key, GeoReference<M> reference,
* @since 2.6
* @see <a href="https://redis.io/commands/geosearch">Redis Documentation: GEOSEARCH</a>
*/
@Nullable
default GeoResults<GeoLocation<M>> search(K key, GeoReference<M> reference, BoundingBox boundingBox,
GeoSearchCommandArgs args) {
return search(key, reference, GeoShape.byBox(boundingBox), args);
Expand All @@ -318,7 +301,6 @@ default GeoResults<GeoLocation<M>> search(K key, GeoReference<M> reference, Boun
* @since 2.6
* @see <a href="https://redis.io/commands/geosearch">Redis Documentation: GEOSEARCH</a>
*/
@Nullable
GeoResults<GeoLocation<M>> search(K key, GeoReference<M> reference,
GeoShape geoPredicate, GeoSearchCommandArgs args);

Expand All @@ -331,7 +313,6 @@ GeoResults<GeoLocation<M>> search(K key, GeoReference<M> reference,
* @since 2.6
* @see <a href="https://redis.io/commands/geosearchstore">Redis Documentation: GEOSEARCHSTORE</a>
*/
@Nullable
default Long searchAndStore(K key, K destKey, Circle within) {
return searchAndStore(key, destKey, GeoReference.fromCircle(within), GeoShape.byRadius(within.getRadius()),
GeoSearchStoreCommandArgs.newGeoSearchStoreArgs());
Expand All @@ -348,7 +329,6 @@ default Long searchAndStore(K key, K destKey, Circle within) {
* @since 2.6
* @see <a href="https://redis.io/commands/geosearchstore">Redis Documentation: GEOSEARCHSTORE</a>
*/
@Nullable
default Long searchAndStore(K key, K destKey, GeoReference<M> reference, Distance radius) {
return searchAndStore(key, destKey, reference, radius, GeoSearchStoreCommandArgs.newGeoSearchStoreArgs());
}
Expand All @@ -365,7 +345,6 @@ default Long searchAndStore(K key, K destKey, GeoReference<M> reference, Distanc
* @since 2.6
* @see <a href="https://redis.io/commands/geosearchstore">Redis Documentation: GEOSEARCHSTORE</a>
*/
@Nullable
default Long searchAndStore(K key, K destKey, GeoReference<M> reference, Distance radius,
GeoSearchStoreCommandArgs args) {
return searchAndStore(key, destKey, reference, GeoShape.byRadius(radius), args);
Expand All @@ -382,7 +361,6 @@ default Long searchAndStore(K key, K destKey, GeoReference<M> reference, Distanc
* @since 2.6
* @see <a href="https://redis.io/commands/geosearchstore">Redis Documentation: GEOSEARCHSTORE</a>
*/
@Nullable
default Long searchAndStore(K key, K destKey, GeoReference<M> reference, BoundingBox boundingBox) {
return searchAndStore(key, destKey, reference, boundingBox, GeoSearchStoreCommandArgs.newGeoSearchStoreArgs());
}
Expand All @@ -399,7 +377,6 @@ default Long searchAndStore(K key, K destKey, GeoReference<M> reference, Boundin
* @since 2.6
* @see <a href="https://redis.io/commands/geosearchstore">Redis Documentation: GEOSEARCHSTORE</a>
*/
@Nullable
default Long searchAndStore(K key, K destKey, GeoReference<M> reference, BoundingBox boundingBox,
GeoSearchStoreCommandArgs args) {
return searchAndStore(key, destKey, reference, GeoShape.byBox(boundingBox), args);
Expand All @@ -417,7 +394,6 @@ default Long searchAndStore(K key, K destKey, GeoReference<M> reference, Boundin
* @since 2.6
* @see <a href="https://redis.io/commands/geosearchstore">Redis Documentation: GEOSEARCHSTORE</a>
*/
@Nullable
Long searchAndStore(K key, K destKey, GeoReference<M> reference, GeoShape geoPredicate,
GeoSearchStoreCommandArgs args);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ public interface HashOperations<H, HK, HV> {
* @since 2.6
* @see <a href="https://redis.io/commands/hrandfield">Redis Documentation: HRANDFIELD</a>
*/
@Nullable
List<HK> randomKeys(H key, long count);

/**
Expand All @@ -135,7 +134,6 @@ public interface HashOperations<H, HK, HV> {
* @since 2.6
* @see <a href="https://redis.io/commands/hrandfield">Redis Documentation: HRANDFIELD</a>
*/
@Nullable
Map<HK, HV> randomEntries(H key, long count);

/**
Expand All @@ -154,8 +152,8 @@ public interface HashOperations<H, HK, HV> {
* @param hashKey must not be {@literal null}.
* @return {@literal null} when used in pipeline / transaction.
* @since 2.1
* @see <a href="https://redis.io/commands/hstrlen">Redis Documentation: HSTRLEN</a>
*/
@Nullable
Long lengthOfValue(H key, HK hashKey);

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ public interface ListOperations<K, V> {
* @return {@literal null} when used in pipeline / transaction.
* @see <a href="https://redis.io/commands/lrange">Redis Documentation: LRANGE</a>
*/
@Nullable
List<V> range(K key, long start, long end);

/**
Expand All @@ -66,7 +65,6 @@ public interface ListOperations<K, V> {
* @return {@literal null} when used in pipeline / transaction.
* @see <a href="https://redis.io/commands/llen">Redis Documentation: LLEN</a>
*/
@Nullable
Long size(K key);

/**
Expand All @@ -77,7 +75,6 @@ public interface ListOperations<K, V> {
* @return {@literal null} when used in pipeline / transaction.
* @see <a href="https://redis.io/commands/lpush">Redis Documentation: LPUSH</a>
*/
@Nullable
Long leftPush(K key, V value);

/**
Expand All @@ -88,7 +85,6 @@ public interface ListOperations<K, V> {
* @return {@literal null} when used in pipeline / transaction.
* @see <a href="https://redis.io/commands/lpush">Redis Documentation: LPUSH</a>
*/
@Nullable
Long leftPushAll(K key, V... values);

/**
Expand All @@ -100,7 +96,6 @@ public interface ListOperations<K, V> {
* @since 1.5
* @see <a href="https://redis.io/commands/lpush">Redis Documentation: LPUSH</a>
*/
@Nullable
Long leftPushAll(K key, Collection<V> values);

/**
Expand All @@ -111,7 +106,6 @@ public interface ListOperations<K, V> {
* @return {@literal null} when used in pipeline / transaction.
* @see <a href="https://redis.io/commands/lpushx">Redis Documentation: LPUSHX</a>
*/
@Nullable
Long leftPushIfPresent(K key, V value);

/**
Expand All @@ -123,7 +117,6 @@ public interface ListOperations<K, V> {
* @return {@literal null} when used in pipeline / transaction.
* @see <a href="https://redis.io/commands/linsert">Redis Documentation: LINSERT</a>
*/
@Nullable
Long leftPush(K key, V pivot, V value);

/**
Expand All @@ -134,7 +127,6 @@ public interface ListOperations<K, V> {
* @return {@literal null} when used in pipeline / transaction.
* @see <a href="https://redis.io/commands/rpush">Redis Documentation: RPUSH</a>
*/
@Nullable
Long rightPush(K key, V value);

/**
Expand All @@ -145,7 +137,6 @@ public interface ListOperations<K, V> {
* @return {@literal null} when used in pipeline / transaction.
* @see <a href="https://redis.io/commands/rpush">Redis Documentation: RPUSH</a>
*/
@Nullable
Long rightPushAll(K key, V... values);

/**
Expand All @@ -157,7 +148,6 @@ public interface ListOperations<K, V> {
* @since 1.5
* @see <a href="https://redis.io/commands/rpush">Redis Documentation: RPUSH</a>
*/
@Nullable
Long rightPushAll(K key, Collection<V> values);

/**
Expand All @@ -168,7 +158,6 @@ public interface ListOperations<K, V> {
* @return {@literal null} when used in pipeline / transaction.
* @see <a href="https://redis.io/commands/rpushx">Redis Documentation: RPUSHX</a>
*/
@Nullable
Long rightPushIfPresent(K key, V value);

/**
Expand All @@ -180,7 +169,6 @@ public interface ListOperations<K, V> {
* @return {@literal null} when used in pipeline / transaction.
* @see <a href="https://redis.io/commands/linsert">Redis Documentation: LINSERT</a>
*/
@Nullable
Long rightPush(K key, V pivot, V value);

/**
Expand Down Expand Up @@ -364,7 +352,6 @@ default V move(K sourceKey, Direction from, K destinationKey, Direction to, Dura
* @return {@literal null} when used in pipeline / transaction.
* @see <a href="https://redis.io/commands/lrem">Redis Documentation: LREM</a>
*/
@Nullable
Long remove(K key, long count, Object value);

/**
Expand Down Expand Up @@ -401,7 +388,6 @@ default V move(K sourceKey, Direction from, K destinationKey, Direction to, Dura
* @since 2.4
* @see <a href="https://redis.io/commands/lpos">Redis Documentation: LPOS</a>
*/
@Nullable
Long lastIndexOf(K key, V value);

/**
Expand Down Expand Up @@ -478,7 +464,6 @@ default V leftPop(K key, Duration timeout) {
* @see <a href="https://redis.io/commands/rpop">Redis Documentation: RPOP</a>
* @since 2.6
*/
@Nullable
List<V> rightPop(K key, long count);

/**
Expand Down
Loading