-
Notifications
You must be signed in to change notification settings - Fork 986
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
rx set operation w/ SetArgs returns value itself instead of a String #159
Labels
type: bug
A general bug
Comments
joshdurbin
changed the title
w/ a custom codec, the 'set' operation w/ SetArgs invokes the decode method w/ string representation of redis' response: ex: 'OK'
rx set operation w/ SetArgs returns value itself instead of a String
Dec 7, 2015
Thank you for reporting the bug. The method return type is required to change from This bug affects 3.x and 4.x version. It will be fixed with 3.3.2.Final, 4.0.2.Final and the bugfix will be included in the future 3.4 and 4.1 versions. |
mp911de
added a commit
that referenced
this issue
Dec 10, 2015
Signature of the set method with SetArgs returned the value instead of the string status response. This mismatch gets obvious when using custom codes with value types other than String. This commit changes the API to fix the mismatch.
mp911de
added a commit
that referenced
this issue
Dec 10, 2015
Signature of the set method with SetArgs returned the value instead of the string status response. This mismatch gets obvious when using custom codes with value types other than String. This commit changes the API to fix the mismatch.
mp911de
added a commit
that referenced
this issue
Dec 10, 2015
Signature of the set method with SetArgs returned the value instead of the string status response. This mismatch gets obvious when using custom codes with value types other than String. This commit changes the API to fix the mismatch.
mp911de
added a commit
that referenced
this issue
Dec 10, 2015
Signature of the set method with SetArgs returned the value instead of the string status response. This mismatch gets obvious when using custom codes with value types other than String. This commit changes the API to fix the mismatch.
Fixed. |
Released 3.3.2.Final and 4.0.2.Final to Maven central. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With a custom codec defined, 'set' operations (and possibly other operations) with SetArgs return an Observable of a specified type (matching the codec). The emitted item from this operation is essentially a String, which represents the redis server response for the operation, eg: "OK". Given that the method signature states it returns an object of the specified type (again, matching the codec), the codec's
decodeValue
method is executed with the input "OK" (or other response, if there's an error).Unless the codec is written to decode this response in additional to actual, expected responses, it will bomb.
In testing, an unmodified codec (unmodified to handle the response, but working otherwise), the method signature below works:
Observable<String> set(K key, V value)
...while this method signature fails w/ a codec exception of an unhanded "OK":
Observable<V> set(K key, V value, SetArgs setArgs)
The text was updated successfully, but these errors were encountered: