spring-data-redis icon indicating copy to clipboard operation
spring-data-redis copied to clipboard

Edit and cleanup up Javadoc

Open jxblum opened this issue 2 years ago • 2 comments

This fixes Javadoc errors and warnings in the Spring Data Redis codebase.

jxblum avatar May 23 '23 15:05 jxblum

Re-opening for additional cleanup and editing.

jxblum avatar May 23 '23 17:05 jxblum

This Javadoc reference is a prime example of incomplete, broken documentation.

The Javadoc for the ListOperations.rightPushAll(key, ...) method states:

rightPushAll

Append values to key.

Parameters:
key - must not be null.

values -

Returns:
null when used in pipeline / transaction.
Since:
1.5
See Also:
[Redis Documentation: RPUSH](https://redis.io/commands/rpush)

key Javadoc is essentially useless with the @NonNullApi documentation.

values is empty, so why declare an @param tag for it; it just creates noise in the source file due to all the missing Javadoc warnings.

@return is mildly more useful and informative. Great! Returns null when used in Redis pipeline mode or in transactions. But, what does the Long value represent?

Does it represent the number of values successfully appended to the list referenced by the key?

Is it some 1 or 0 value based on success or failure?

No, it is not until I navigate to the Redis RPUSH command documentation do I learn that the value represents the size of the list after the push.

However, what happens when I don't have a Internet connection readily available? What if I am working in offline mode?

jxblum avatar Nov 16 '23 02:11 jxblum