Currently the descriptions of `URLEncoder.encode` and `URLDecoder.decode` don't specify their use of replacement bytes or replacement character when they cannot handle a character or sequence of bytes. This is longstanding behavior but needs to be documented.
**Solution** - Added a new line to `URLEncoder.encode` API documentation to document that the charset's replacement bytes are used. - Also changed `URLDecoder.decode` API documentation to document its use of the charset's replacement character, also changed some wording. ------------- Commit messages: - specify that replacement bytes will be used in case of coding error Changes: https://git.openjdk.org/jdk/pull/16709/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=16709&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8316734 Stats: 12 lines in 2 files changed: 7 ins; 0 del; 5 mod Patch: https://git.openjdk.org/jdk/pull/16709.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/16709/head:pull/16709 PR: https://git.openjdk.org/jdk/pull/16709
