Skip to content

Commit 928a786

Browse files
committed
Polishing.
Consistently use literal null. See #3010
1 parent 943bb8f commit 928a786

22 files changed

+42
-42
lines changed

src/main/java/org/springframework/data/redis/cache/DefaultRedisCacheWriter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ interface AsyncCacheWriter {
429429
* @param name the cache name from which to retrieve the cache entry.
430430
* @param key the cache entry key.
431431
* @param ttl optional TTL to set for Time-to-Idle eviction.
432-
* @return a future that completes either with a value if the value exists or completing with {@code null} if the
432+
* @return a future that completes either with a value if the value exists or completing with {@literal null} if the
433433
* cache does not contain an entry.
434434
*/
435435
CompletableFuture<byte[]> retrieve(String name, byte[] key, @Nullable Duration ttl);

src/main/java/org/springframework/data/redis/cache/RedisCacheWriter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ static TtlFunction persistent() {
293293
* persistent value that does not expire.
294294
*
295295
* @param key the cache key.
296-
* @param value the cache value. Can be {@code null} if the cache supports {@code null} value caching.
296+
* @param value the cache value. Can be {@literal null} if the cache supports {@literal null} value caching.
297297
* @return the computed {@link Duration time-to-live (TTL)}. Can be {@link Duration#ZERO} for persistent values
298298
* (i.e. cache entry does not expire).
299299
*/

src/main/java/org/springframework/data/redis/connection/ReactiveHashCommands.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ default Mono<ByteBuffer> hGet(ByteBuffer key, ByteBuffer field) {
289289

290290
/**
291291
* Get values for given {@literal fields} from hash at {@literal key}. Values are in the order of the requested keys.
292-
* Absent field values are represented using {@code null} in the resulting {@link List}.
292+
* Absent field values are represented using {@literal null} in the resulting {@link List}.
293293
*
294294
* @param key must not be {@literal null}.
295295
* @param fields must not be {@literal null}.
@@ -306,7 +306,7 @@ default Mono<List<ByteBuffer>> hMGet(ByteBuffer key, Collection<ByteBuffer> fiel
306306

307307
/**
308308
* Get values for given {@literal fields} from hash at {@literal key}. Values are in the order of the requested keys.
309-
* Absent field values are represented using {@code null} in the resulting {@link List}.
309+
* Absent field values are represented using {@literal null} in the resulting {@link List}.
310310
*
311311
* @param commands must not be {@literal null}.
312312
* @return

src/main/java/org/springframework/data/redis/connection/ReactiveStringCommands.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ default Mono<ByteBuffer> getSet(ByteBuffer key, ByteBuffer value) {
350350

351351
/**
352352
* Get multiple values in one batch. Values are in the order of the requested keys. Absent field values are
353-
* represented using {@code null} in the resulting {@link List}.
353+
* represented using {@literal null} in the resulting {@link List}.
354354
*
355355
* @param keys must not be {@literal null}.
356356
* @return
@@ -365,7 +365,7 @@ default Mono<List<ByteBuffer>> mGet(List<ByteBuffer> keys) {
365365

366366
/**
367367
* Get multiple values at for {@literal keysets} in batches. Values are in the order of the requested keys. Absent
368-
* field values are represented using {@code null} in the resulting {@link List}.
368+
* field values are represented using {@literal null} in the resulting {@link List}.
369369
*
370370
* @param keysets must not be {@literal null}.
371371
* @return

src/main/java/org/springframework/data/redis/connection/RedisHashCommands.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public interface RedisHashCommands {
6969

7070
/**
7171
* Get values for given {@code fields} from hash at {@code key}. Values are in the order of the requested keys Absent
72-
* field values are represented using {@code null} in the resulting {@link List}.
72+
* field values are represented using {@literal null} in the resulting {@link List}.
7373
*
7474
* @param key must not be {@literal null}.
7575
* @param fields must not be {@literal empty}.

src/main/java/org/springframework/data/redis/connection/RedisStringCommands.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@ enum BitOperation {
8686

8787
/**
8888
* Get multiple {@code keys}. Values are in the order of the requested keys Absent field values are represented using
89-
* {@code null} in the resulting {@link List}.
89+
* {@literal null} in the resulting {@link List}.
9090
*
9191
* @param keys must not be {@literal null}.
92-
* @return {@code null} when used in pipeline / transaction.
92+
* @return {@literal null} when used in pipeline / transaction.
9393
* @see <a href="https://redis.io/commands/mget">Redis Documentation: MGET</a>
9494
*/
9595
@Nullable

src/main/java/org/springframework/data/redis/connection/lettuce/LettuceFutureUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ static <T> T join(CompletionStage<T> future) throws RuntimeException, Completion
8787

8888
/**
8989
* Returns a {@link Function} that ignores {@link CompletionStage#exceptionally(Function) exceptional completion} by
90-
* recovering to {@code null}. This allows to progress with a previously failed {@link CompletionStage} without regard
91-
* to the actual success/exception state.
90+
* recovering to {@literal null}. This allows to progress with a previously failed {@link CompletionStage} without
91+
* regard to the actual success/exception state.
9292
*
9393
* @return
9494
*/

src/main/java/org/springframework/data/redis/core/BoundHashOperations.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public interface BoundHashOperations<H, HK, HV> extends BoundKeyOperations<H> {
6161

6262
/**
6363
* Get values for given {@code keys} from the hash at the bound key. Values are in the order of the requested keys
64-
* Absent field values are represented using {@code null} in the resulting {@link List}.
64+
* Absent field values are represented using {@literal null} in the resulting {@link List}.
6565
*
6666
* @param keys must not be {@literal null}.
6767
* @return {@literal null} when used in pipeline / transaction.

src/main/java/org/springframework/data/redis/core/HashOperations.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public interface HashOperations<H, HK, HV> {
6161

6262
/**
6363
* Get values for given {@code hashKeys} from hash at {@code key}. Values are in the order of the requested keys
64-
* Absent field values are represented using {@code null} in the resulting {@link List}.
64+
* Absent field values are represented using {@literal null} in the resulting {@link List}.
6565
*
6666
* @param key must not be {@literal null}.
6767
* @param hashKeys must not be {@literal null}.

src/main/java/org/springframework/data/redis/core/ReactiveHashOperations.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
* <p>
2929
* Streams of methods returning {@code Mono<K>} or {@code Flux<M>} are terminated with
3030
* {@link org.springframework.dao.InvalidDataAccessApiUsageException} when
31-
* {@link org.springframework.data.redis.serializer.RedisElementReader#read(ByteBuffer)} returns {@code null} for a
32-
* particular element as Reactive Streams prohibit the usage of {@code null} values.
31+
* {@link org.springframework.data.redis.serializer.RedisElementReader#read(ByteBuffer)} returns {@literal null} for a
32+
* particular element as Reactive Streams prohibit the usage of {@literal null} values.
3333
*
3434
* @author Mark Paluch
3535
* @author Christoph Strobl
@@ -66,7 +66,7 @@ public interface ReactiveHashOperations<H, HK, HV> {
6666

6767
/**
6868
* Get values for given {@code hashKeys} from hash at {@code key}. Values are in the order of the requested keys.
69-
* Absent field values are represented using {@code null} in the resulting {@link List}.
69+
* Absent field values are represented using {@literal null} in the resulting {@link List}.
7070
*
7171
* @param key must not be {@literal null}.
7272
* @param hashKeys must not be {@literal null}.

0 commit comments

Comments
 (0)