Never use String#getBytes() in the production code (#9487)
Summary: There are encodings that are not ASCII-compatible (like cp1140), so it is possible that a JVM is run with a default encoding in which String#getBytes() would return unexpected values even for ASCII strings. A little bit of context: https://stackoverflow.com/questions/70913929/can-an-encoding-incompatible-with-ascii-encoding-be-set-as-a-default-encoding-in/70914154 Pull Request resolved: https://github.com/facebook/rocksdb/pull/9487 Reviewed By: riversand963 Differential Revision: D34097728 fbshipit-source-id: afd654ecaf20f6d30d9fc20c6a090398de2585ebmain
parent
736a7b5433
commit
00889cf8f2
Loading…
Reference in new issue