Closed BenjaminHutchinson closed 2 years ago
Thank you @BenjaminHutchinson , for reporting this! I have just pushed the fix. Our mistake was not having a test coverage for that functionality.
Looking forward for more contribution from you!
Here is a SNAPSHOT with the fix: https://repo.spring.io/libs-snapshot-local/org/springframework/integration/spring-integration-hazelcast/3.0.1-SNAPSHOT/spring-integration-hazelcast-3.0.1-SNAPSHOT.jar.
Let us know and we can that 3.0.1
since we have a couple more fixes over there.
Cheers for the quick fix, I've begun using the library in a project I'm working on so I'll be able to pass along any feedback that comes from that as well.
Expected Behavior
The 'doListKeys' method in HazelcastMessageStore should return a list of keys within the message store that match the pattern
Current Behavior The method currently returns the full value object, which causes a classcastexception down the line.
Context
I believe the method should internally be calling keySet on line 82, instead of values.
Caused by: java.lang.ClassCastException: class org.springframework.integration.store.MessageGroupMetadata cannot be cast to class java.lang.String (org.springframework.integration.store.MessageGroupMetadata is in unnamed module of loader 'app'; java.lang.String is in module java.base of loader 'bootstrap') at org.springframework.integration.store.AbstractKeyValueMessageStore.normalizeKeys(AbstractKeyValueMessageStore.java:361) ~[spring-integration-core-5.4.6.jar:5.4.6] at org.springframework.integration.store.AbstractKeyValueMessageStore.iterator(AbstractKeyValueMessageStore.java:352) ~[spring-integration-core-5.4.6.jar:5.4.6] at org.springframework.integration.store.AbstractMessageGroupStore.expireMessageGroups(AbstractMessageGroupStore.java:128) ~[spring-integration-core-5.4.6.jar:5.4.6]