You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Dan Smith (Jira)" <ji...@apache.org> on 2021/05/18 22:57:00 UTC
[jira] [Created] (GEODE-9287) Eliminate use of platform dependent
String.getBytes() and new String(bytes) calls in redis
Dan Smith created GEODE-9287:
--------------------------------
Summary: Eliminate use of platform dependent String.getBytes() and new String(bytes) calls in redis
Key: GEODE-9287
URL: https://issues.apache.org/jira/browse/GEODE-9287
Project: Geode
Issue Type: Bug
Components: redis
Reporter: Dan Smith
We have a number of places that call either String.getBytes() or new String(bytes) in the redis module.
These methods may produce different output depending on the underlying platforms default encoding.
We should switch these places to call use our standard Coder.stringToBytes and bytesToString methods. Those methods should use UTF-8 encoding, eg String.getBytes(StandardCharsets.UTF-8).
We should eliminate conversions between bytes and strings as much as possible on critical path code. In particular, our parser should have constants for the byte[] values of all of the static strings in the commands.
We may want to consider encoding error responses as ASCII, rather than UTF-8, for more compatibility with different clients if an error message accidentally contains a non-ascii character.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)