`String.decodeWithDecoder()` method requires the `CharsetDecoder` parameter replaces on malformed/unmappable characters with replacements. However, there was a code path that lacked to set the `CodingErrorAction.REPLACE` on the decoder. Unrelated, one typo in a test was also fixed.
------------- Commit messages: - 8286287: Reading file as UTF-16 causes Error which "shouldn't happen" Changes: https://git.openjdk.java.net/jdk/pull/8640/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=8640&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-8286287 Stats: 55 lines in 3 files changed: 52 ins; 2 del; 1 mod Patch: https://git.openjdk.java.net/jdk/pull/8640.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8640/head:pull/8640 PR: https://git.openjdk.java.net/jdk/pull/8640