Skip to content

Document conditional set return values #3414

Closed

Description

@ML-Marco

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.

Activity

  1. AzazelSensei commented on Aug 14, 2026

    @AzazelSensei
  2. changed the title [-]setIfAbsent return value is unclear[/-] [+]Document setNX / setIfAbsent return values[/+] on Sep 24, 2026
  3. changed the title [-]Document setNX / setIfAbsent return values[/-] [+]Document conditional set return values[/+] on Sep 24, 2026
  4. added a commit that references this issue on Sep 24, 2026
    d086b3e
  5. added this to the 4.0.8 (2025.1.8) milestone on Sep 24, 2026
  6. added a commit that references this issue on Sep 24, 2026
    ff53ba9
  7. added a commit that references this issue on Sep 25, 2026
    85887bf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions