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

Wrong type parameter in StreamMessageListenerContainerOptionsBuilder.hashValueSerializer() [DATAREDIS-1110] #1679

Closed
spring-projects-issues opened this issue Mar 4, 2020 · 0 comments
Assignees
Labels
in: core type: bug

Comments

@spring-projects-issues
Copy link

@spring-projects-issues spring-projects-issues commented Mar 4, 2020

Bakkenrak opened DATAREDIS-1110 and commented

The wrong type parameter is used for the "serializer" parameter of StreamMessageListenerContainerOptionsBuilder.hashValueSerializer(). This messes with the type of the built StreamMessageListenerContainerOptions when using this builder method.

 

i.e. this won't compile:

StreamMessageListenerContainer.StreamMessageListenerContainerOptions<String, MapRecord<String, String, byte[]>> options = 
        StreamMessageListenerContainer.StreamMessageListenerContainerOptions
                .builder()
                .<String, byte[]>hashValueSerializer(RedisSerializer.byteArray())
                .build();

 

This is likely due to a copy & paste oversight and should simply be the hash value type parameter "HV" instead of hash key type "HK"


Affects: 2.2.5 (Moore SR5)

Reference URL: https://github.com/spring-projects/spring-data-redis/blob/master/src/main/java/org/springframework/data/redis/stream/StreamMessageListenerContainer.java#L726

Referenced from: pull request #515

Backported to: 2.2.6 (Moore SR6)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core type: bug
Projects
None yet
Development

No branches or pull requests

2 participants