Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Never use String#getBytes() in the production code (facebook#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: facebook#9487 Reviewed By: riversand963 Differential Revision: D34097728 fbshipit-source-id: afd654ecaf20f6d30d9fc20c6a090398de2585eb
- Loading branch information