Donal Evans created GEODE-9605:
----------------------------------
Summary: Using hard-coded character literals in Redis module is
fine
Key: GEODE-9605
URL: https://issues.apache.org/jira/browse/GEODE-9605
Project: Geode
Issue Type: Improvement
Components: redis
Affects Versions: 1.15.0
Reporter: Donal Evans
A comment in the StringBytesGlossary class (formerly in the Coder class) states:
{noformat}
/**
* Important note
* <p>
* Do not use '' <-- java primitive chars. Redis uses \{@link Coder#CHARSET}
encoding so we should
* not risk java handling char to byte conversions, rather just hard code
\{@link Coder#CHARSET}
* chars as bytes
*/
{noformat}
which has led to many single-byte constants being introduced in the
StringBytesGlossary class for use in comparisons. However, since these
primitives are handled at compile time and the compiler always uses UTF-16,
there is no need to work around any platform-specific character set issues. To
simplify the code, the existing character constants should be inlined and
removed from the StringBytesGlossary class, along with the above comment.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)