RFR: 8316734: URLEncoder should specify that replacement bytes will be used in case of coding error [v3]

Darragh Clarke dclarke at openjdk.org
Mon Nov 27 14:24:32 UTC 2023


> 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.

Darragh Clarke has updated the pull request incrementally with one additional commit since the last revision:

  Implemented feedback

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/16709/files
  - new: https://git.openjdk.org/jdk/pull/16709/files/2ee3f715..eade3abe

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=16709&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=16709&range=01-02

  Stats: 11 lines in 1 file changed: 5 ins; 4 del; 2 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


More information about the net-dev mailing list