spring-projects / spring-projects/spring-data-redis
setIfAbsent return value is unclear
Open
Beginner friendly
Nobody has claimed this yet.
status: waiting-for-triage
- Dominant language
- Java
- Stars
- 1.9k
- Forks
- 1.3k
- PR merge metrics
- No merged PRs in 30d
Description
The Javadoc for org.springframework.data.redis.core.ValueOperations#setIfAbsent(K, V) is:
/**
* Set the {@code value} for {@code key} if {@code key} is absent.
*
* @param key must not be {@literal null}.
* @param value must not be {@literal null}.
* @return {@literal null} when used in pipeline / transaction.
* @see <a href="https://redis.io/commands/set">Redis Documentation: SET</a>
*/
This does not mention what the method returns when not used in pipeline / transaction.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open org.springframework.data.redis.core.ValueOperations#setIfAbsent(K, V) and read its existing Javadoc, especially the return description. Update the documentation to state the return value outside pipeline or transaction use; done means both execution contexts are clearly described.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, redis
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100