Skip to content
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

DefaultRedisSerializationContextBuilder.string() should assign param to stringTuple instead of hashValueTuple #2651

Closed
imzhoukunqiang opened this issue Jul 26, 2023 · 1 comment
Assignees
Labels
in: core Issues in core support type: bug A general bug

Comments

@imzhoukunqiang
Copy link
Contributor

Hi Team,

Below there is a code snippet from DefaultRedisSerializationContext ,line 130. The string() method assign param tuple to hashValueTuple, it should be assigned stringTuple I think.

		@Override
		public RedisSerializationContextBuilder<K, V> hashValue(SerializationPair<?> tuple) {

			Assert.notNull(tuple, "SerializationPair must not be null");

			this.hashValueTuple = tuple;
			return this;
		}

		@Override
		public RedisSerializationContextBuilder<K, V> string(SerializationPair<String> tuple) {

			Assert.notNull(tuple, "SerializationPair must not be null");
                        
			this.hashValueTuple = tuple;
			return this;
		}
@jxblum
Copy link
Contributor

jxblum commented Jul 27, 2023

Hi @imzhoukunqiang - Yes, upon review, your assessment here seems correct. Thank you for catching this problem and contributing a fix, as well as the nice set of test cases. Much appreciated.

It appears, this problem stems back to the 2.7.x branch as well.

I will finish the review, polish this a bit and merge it!

@jxblum jxblum self-assigned this Jul 27, 2023
@jxblum jxblum added type: bug A general bug in: core Issues in core support and removed status: waiting-for-triage An issue we've not yet triaged labels Jul 27, 2023
@jxblum jxblum added this to the 2.7.15 (2021.2.15) milestone Jul 27, 2023
jxblum added a commit to jxblum/spring-data-redis that referenced this issue Jul 27, 2023
@jxblum jxblum closed this as completed in ddeccf0 Jul 27, 2023
jxblum pushed a commit to jxblum/spring-data-redis that referenced this issue Jul 27, 2023
…' to 'stringTuple'.

Currently, the builder method incorrectly assigns 'tuple' SerializationPair<String> argument to 'hashValueTuple'.

Closes spring-projects#2651
Original pull request: spring-projects#2652
jxblum added a commit to jxblum/spring-data-redis that referenced this issue Jul 27, 2023
jxblum pushed a commit to jxblum/spring-data-redis that referenced this issue Jul 27, 2023
…ilder.string().

Currently, the builder method incorrectly assigns 'tuple' SerializationPair<String> argument to 'hashValueTuple'.

Closes spring-projects#2651
Original pull request: spring-projects#2652
jxblum added a commit to jxblum/spring-data-redis that referenced this issue Jul 27, 2023
jxblum pushed a commit to jxblum/spring-data-redis that referenced this issue Jul 27, 2023
…ilder.string().

Currently, the builder method incorrectly assigns 'tuple' SerializationPair<String> argument to 'hashValueTuple'.

Closes spring-projects#2651
Original pull request: spring-projects#2652
jxblum added a commit to jxblum/spring-data-redis that referenced this issue Jul 27, 2023
jxblum pushed a commit to jxblum/spring-data-redis that referenced this issue Jul 27, 2023
…ilder.string().

Currently, the builder method incorrectly assigns 'tuple' SerializationPair<String> argument to 'hashValueTuple'.

Closes spring-projects#2651
Original pull request: spring-projects#2652
jxblum added a commit to jxblum/spring-data-redis that referenced this issue Jul 27, 2023
jxblum pushed a commit to jxblum/spring-data-redis that referenced this issue Jul 28, 2023
…ilder.string().

Currently, the builder method incorrectly assigns 'tuple' SerializationPair<String> argument to 'hashValueTuple'.

Closes spring-projects#2651
Original pull request: spring-projects#2652
jxblum added a commit to jxblum/spring-data-redis that referenced this issue Jul 28, 2023
jxblum added a commit to jxblum/spring-data-redis that referenced this issue Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core support type: bug A general bug
Projects
None yet
Development

No branches or pull requests

3 participants