[
https://issues.apache.org/jira/browse/GEODE-9482?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17406127#comment-17406127
]
ASF subversion and git services commented on GEODE-9482:
--------------------------------------------------------
Commit faf76ad93e8b88c1ba5771107857a0dcb6ddc6ba in geode's branch
refs/heads/develop from Darrel Schneider
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=faf76ad ]
GEODE-9482: change Coder.bytesToLong to fail if bytes start with "-0" or "+"
(#6807)
* cleaned up Coder's double conversion code to not do extra
equality checks and to make the use of String in the conversion internal
to Coder. The public contract is byte[]->double and double->byte[].
* bytesToLong no longer allows the bytes to start with "-0" or "+".
> Radish commands do not match Redis error behaviour for integer arguments
> beginning "-0" and "+"
> -----------------------------------------------------------------------------------------------
>
> Key: GEODE-9482
> URL: https://issues.apache.org/jira/browse/GEODE-9482
> Project: Geode
> Issue Type: Bug
> Components: redis
> Affects Versions: 1.15.0
> Reporter: Donal Evans
> Assignee: Darrel Schneider
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.15.0
>
>
> When using native Redis, commands that take integer arguments return {{"ERR
> value is not an integer or out of range"}} if the argument begins with "-0"
> or "+". The current implementation of these commands in Geode does not behave
> the same way.
> The {{Coder.bytesToLong()}} method should be modified to check for the first
> two characters being "-0" or "+" and throw a {{NumberFormatException}} if
> that is the case. Alternately, if there are places where we want to preserve
> the existing behaviour of {{Coder.bytesToLong()}}, an additional
> {{bytesToLongStrict()}} method could be added to the {{Coder}} class with
> this additional check.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)