Skip to content

Commit 18b196c

Browse files
authored
Fix hardcoded string in loadHash method
Overview This PR addresses a small issue in the loadHash method of the HashMapping class where the hardcoded string "key" was used instead of the parameter key when retrieving a hash from Redis. Description In the loadHash method of the HashMapping class, the hardcoded string "key" was used to retrieve the hash from Redis instead of utilizing the parameter key provided to the method. This PR corrects this issue by modifying the method call to use the provided key parameter, ensuring the correct hash is loaded. Changes Made Updated the loadHash method in the HashMapping class to use the provided key parameter when retrieving the hash from Redis, replacing the hardcoded string "key". Testing No new functionality is introduced with this change, and existing unit tests cover the modified method. Tests have been run locally to ensure that the correct hash is loaded using the provided key parameter. Request for Review I kindly request a review of this PR. Your feedback is greatly appreciated. Thank you for your time and consideration.
1 parent 32ace71 commit 18b196c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/antora/modules/ROOT/pages/redis/hash-mappers.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public class HashMapping {
4444
4545
public Person loadHash(String key) {
4646
47-
Map<byte[], byte[]> loadedHash = hashOperations.entries("key");
47+
Map<byte[], byte[]> loadedHash = hashOperations.entries(key);
4848
return (Person) mapper.fromHash(loadedHash);
4949
}
5050
}

0 commit comments

Comments
 (0)